Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 47 additions & 34 deletions .github/workflows/pr-review.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
on:
workflow_call:
name: jobtaker
on:
pull_request:
types: [opened, synchronize, ready_for_review, reopened]
permissions:
contents: read
checks: write
pull-requests: write
id-token: write
jobs:
config:
if: |
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@jobtaker')) ||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@jobtaker')) ||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@jobtaker')) ||
(contains(github.event.pull_request.labels.*.name, 'jobtaker')) ||
(github.event_name == 'issues' && (contains(github.event.issue.body, '@jobtaker') || contains(github.event.issue.title, '@jobtaker')))
runs-on: ${{ vars.RUNNER }}
name: generate config
outputs:
config: ${{ steps.merge.outputs.config }}
steps:
- name: merge
id: merge
uses: carteramesh/ci/.github/actions/rust-config@main
with:
git_token: ${{ github.token }}
runner: ${{ vars.RUNNER }}
jobtaker:
if: |
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@jobtaker')) ||
Expand All @@ -28,43 +16,68 @@ jobs:
(contains(github.event.pull_request.labels.*.name, 'jobtaker')) ||
(github.event_name == 'issues' && (contains(github.event.issue.body, '@jobtaker') || contains(github.event.issue.title, '@jobtaker')))
runs-on: ${{ vars.RUNNER }}
needs: [config]
permissions:
contents: read
pull-requests: write
id-token: write
steps:
- name: Init
uses: carteramesh/ci/.github/actions/rust-init@main
with:
packages: ${{ toJSON(fromJSON(needs.config.outputs.config).global.packages) }}
- name: Validate ANTROPIC_API_KEY
- name: Validate ANTHROPIC_API_KEY
shell: bash
run: |
[ -z "${{ secrets.ANTROPIC_API_KEY }}" ] && exit 1
[ -z "${{ secrets.ANTHROPIC_API_KEY }}" ] && exit 1
- name: jobtaker
if: ${{ fromJSON(needs.config.outputs.config).ai.enabled }}
uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
trigger_phrase: '@jobtaker'
settings: ${{ toJSON(fromJSON(needs.config.outputs.config).ai.settings) }}
# settings: ${{ toJSON(fromJSON(needs.config.outputs.config).ai.settings) }}
# description: "Claude Code settings as JSON string or path to settings JSON file"
allowed_bots: ${{ fromJSON(needs.config.outputs.config).ai.allowed_bots }}
allowed_bots: '*'
# description: "Comma-separated list of allowed bot usernames, or '*' to allow all bots. Empty string (default) allows no bots."
# Your custom review instructions
prompt: |
REPO: ${{ github.repository }}
PR NUMBER: ${{ github.event.pull_request.number }}

${{ fromJSON(needs.config.outputs.config).ai.prompt }}
Provide detailed feedback using inline comments for ONLY issues, no praise inline comments.
Use top-level comments for general observations or praise
Do not be shy, I am a big boy and can handle criticism gracefully. I welcome feedback and suggestions.

Review this PR against our team checklist:

## Code Quality
- [ ] Code follows our style guide
- [ ] No commented-out code
- [ ] Meaningful variable names
- [ ] DRY principle followed

## Testing
- [ ] Unit tests for new functions
- [ ] Integration tests for new endpoints
- [ ] Edge cases covered
- [ ] Test coverage > 80%

## Documentation
- [ ] README updated if needed
- [ ] API docs updated
- [ ] Inline comments for complex logic
- [ ] CHANGELOG.md updated

## Security
- [ ] No hardcoded credentials
- [ ] Input validation implemented
- [ ] Proper error handling
- [ ] No sensitive data in logs

For each item, check if it is satisfied and comment on any that need attention.
Post a summary comment with checklist results.
# Tools for comprehensive PR review
claude_args: ${{ fromJSON(needs.config.outputs.config).ai.claude_args }}
use_sticky_comment: ${{ fromJSON(needs.config.outputs.config).ai.use_sticky_comment }}
# claude_args: ${{ fromJSON(needs.config.outputs.config).ai.claude_args }}
use_sticky_comment: false
# description: "Use just one comment to deliver issue/PR comments"
# required: false
# default: "false"
track_progress: ${{ fromJSON(needs.config.outputs.config).ai.track_progress }}
track_progress: true
# description: "Force tag mode with tracking comments for pull_request and issue events. Only applicable to pull_request (opened, synchronize, ready_for_review, reopened) and issue (opened, edited, labeled, assigned) events."
path_to_claude_code_executable: ''
# description: "Optional path to a custom Claude Code executable. If provided, skips automatic installation and uses this executable instead. WARNING: Using an older version may cause problems if the action begins taking advantage of new Claude Code features. This input is typically not needed unless you're debugging something specific or have unique needs in your environment."
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"license": "MIT",
"dependencies": {
"@actions/core": "^2.0.2",
"zod": "^4.1.13"
"zod": "^4.3.5"
},
"devDependencies": {
"@eslint/compat": "^2.0.0",
Expand Down
Loading