Skip to content

Commit 3472adb

Browse files
StuMasonclaude
andcommitted
ci: Improve Claude code review workflow
- Skip Dependabot PRs - Full git history for context - Detailed review prompt (security, bugs, style, improvements) - Write permission to post comments Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent f02441d commit 3472adb

File tree

1 file changed

+15
-19
lines changed

1 file changed

+15
-19
lines changed

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

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,42 +3,38 @@ name: Claude Code Review
33
on:
44
pull_request:
55
types: [opened, synchronize, ready_for_review, reopened]
6-
# Optional: Only run on specific file changes
7-
# paths:
8-
# - "src/**/*.ts"
9-
# - "src/**/*.tsx"
10-
# - "src/**/*.js"
11-
# - "src/**/*.jsx"
126

137
jobs:
148
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-
9+
# Skip Dependabot PRs
10+
if: github.actor != 'dependabot[bot]'
2111
runs-on: ubuntu-latest
2212
permissions:
2313
contents: read
24-
pull-requests: read
14+
pull-requests: write
2515
issues: read
2616
id-token: write
2717

2818
steps:
2919
- name: Checkout repository
3020
uses: actions/checkout@v4
3121
with:
32-
fetch-depth: 1
22+
fetch-depth: 0
3323

3424
- name: Run Claude Code Review
3525
id: claude-review
3626
uses: anthropics/claude-code-action@v1
3727
with:
3828
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
39-
plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
40-
plugins: 'code-review@claude-code-plugins'
41-
prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'
42-
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
43-
# or https://code.claude.com/docs/en/cli-reference for available options
29+
prompt: |
30+
Review this PR thoroughly. For each changed file:
31+
32+
1. **Summary**: What does this change do?
33+
2. **Security**: Any security concerns (auth, injection, secrets)?
34+
3. **Bugs**: Logic errors, edge cases, error handling?
35+
4. **Style**: Consistency with codebase patterns?
36+
5. **Improvements**: Suggestions for better approaches?
37+
38+
Be specific. Reference line numbers. If everything looks good, say why.
4439
40+
PR: ${{ github.repository }}/pull/${{ github.event.pull_request.number }}

0 commit comments

Comments
 (0)