Skip to content

Commit 90e9225

Browse files
committed
"Update Claude Code Review workflow"
1 parent 4a4174d commit 90e9225

File tree

1 file changed

+24
-14
lines changed

1 file changed

+24
-14
lines changed

.github/workflows/claude-code-review.yml

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,46 +2,56 @@ name: Claude Code Review
22

33
on:
44
pull_request:
5-
types: [opened, synchronize, ready_for_review, reopened]
5+
types: [opened, synchronize]
6+
# Optional: Only run on specific file changes
7+
# paths:
8+
# - "src/**/*.ts"
9+
# - "src/**/*.tsx"
10+
# - "src/**/*.js"
11+
# - "src/**/*.jsx"
612

713
jobs:
814
claude-review:
15+
# Optional: Filter by PR author
16+
# if: |
17+
# github.event.pull_request.user.login == 'external-contributor' ||
18+
# github.event.pull_request.user.login == 'new-developer' ||
19+
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
20+
921
runs-on: ubuntu-latest
1022
permissions:
1123
contents: read
1224
pull-requests: read
25+
issues: read
1326
id-token: write
27+
1428
steps:
1529
- name: Checkout repository
16-
uses: actions/checkout@v5
30+
uses: actions/checkout@v4
1731
with:
1832
fetch-depth: 1
1933

2034
- name: Run Claude Code Review
35+
id: claude-review
2136
uses: anthropics/claude-code-action@v1
2237
with:
23-
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
24-
track_progress: true
38+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
2539
prompt: |
40+
REPO: ${{ github.repository }}
41+
PR NUMBER: ${{ github.event.pull_request.number }}
42+
2643
Please review this pull request and provide feedback on:
2744
- Code quality and best practices
2845
- Potential bugs or issues
2946
- Performance considerations
3047
- Security concerns
3148
- Test coverage
32-
- Documentation
3349
3450
Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback.
3551
3652
Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR.
3753
38-
When performing batch operations (e.g., closing multiple issues, creating multiple PRs):
39-
- Use the TodoWrite tool to track all items that need to be processed
40-
- Process ALL items in the list without stopping early
41-
- Mark each item as completed only after successful execution
42-
- If any operation fails, retry it or note the failure and continue with remaining items
43-
- Provide a final summary of what was completed vs what failed
54+
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
55+
# or https://docs.claude.com/en/docs/claude-code/cli-reference for available options
56+
claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"'
4457

45-
claude_args: |
46-
--model opus
47-
--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*)"

0 commit comments

Comments
 (0)