Skip to content

Commit 03d2b93

Browse files
Add Claude Code auto-review workflow for pull requests
Add a new GitHub Actions workflow that automatically triggers Claude Code to review pull requests when they are opened or synchronized. The workflow uses the official claude-code-action and focuses on code quality, bugs, security, and performance considerations. Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 2f198fd commit 03d2b93

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Claude Auto Review
2+
on:
3+
pull_request:
4+
types: [opened, synchronize]
5+
6+
jobs:
7+
review:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
11+
pull-requests: write
12+
id-token: write
13+
steps:
14+
- uses: actions/checkout@v6
15+
with:
16+
fetch-depth: 1
17+
18+
- uses: anthropics/claude-code-action@v1
19+
with:
20+
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
21+
prompt: |
22+
REPO: ${{ github.repository }}
23+
PR NUMBER: ${{ github.event.pull_request.number }}
24+
25+
Please review this pull request with a focus on:
26+
- Code quality and best practices
27+
- Potential bugs or issues
28+
- Security implications
29+
- Performance considerations
30+
31+
Note: The PR branch is already checked out in the current working directory.
32+
33+
Use `gh pr comment` for top-level feedback.
34+
Use `mcp__github_inline_comment__create_inline_comment` to highlight specific code issues.
35+
Only post GitHub comments - don't submit review text as messages.
36+
37+
claude_args: |
38+
--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)