Skip to content

Commit 6422f14

Browse files
authored
feat: Add Claude Code Action automated PR review workflow (#81)
* feat: add cca review workflow * fix: skip job for fork PRs * chore: rename the workflow
1 parent 082bf9e commit 6422f14

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/cca-review.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Claude Code Action Review
2+
on:
3+
pull_request:
4+
types: [opened, synchronize, ready_for_review, reopened]
5+
6+
jobs:
7+
cca-review:
8+
runs-on: ubuntu-latest
9+
# Skip for forked PRs - external contributors don't have access to repository secrets
10+
# This prevents the job from failing when secrets.ANTHROPIC_API_KEY is unavailable
11+
if: github.event.pull_request.head.repo.full_name == github.repository
12+
permissions:
13+
contents: read
14+
pull-requests: write
15+
id-token: write
16+
environment:
17+
name: integration
18+
steps:
19+
- uses: actions/checkout@v5
20+
with:
21+
fetch-depth: 1
22+
23+
- uses: anthropics/claude-code-action@v1
24+
with:
25+
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
26+
track_progress: true
27+
prompt: |
28+
REPO: ${{ github.repository }}
29+
PR NUMBER: ${{ github.event.pull_request.number }}
30+
31+
Please review this pull request with a focus on:
32+
- Code quality and best practices
33+
- Potential bugs or issues
34+
- Security implications
35+
- Performance considerations
36+
37+
Please take @.ai/project-prd, @.ai/tech-stack and other applicable context documents into account.
38+
39+
Provide detailed feedback using inline comments for specific issues.
40+
41+
claude_args: |
42+
--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)