Skip to content

Commit 3952650

Browse files
Add Claude Code review workflow (#1353)
## Summary - Adds a Claude Code review workflow that automatically reviews PRs for bugs, security issues, and code quality - Uses Bedrock with OIDC authentication via `TELEGEN_AWS_ASSUME_ROLE_ARN` secret - Triggers on PR open, sync, ready_for_review, and reopen events targeting `main` - Includes concurrency control, draft PR filtering, and a 15-minute timeout ## Test plan - [x] Set the `TELEGEN_AWS_ASSUME_ROLE_ARN` repo secret with the appropriate IAM role ARN - [x] Open a test PR to verify the workflow triggers and Claude posts review comments
1 parent 74b9b1f commit 3952650

1 file changed

Lines changed: 51 additions & 0 deletions

File tree

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Claude Code Review
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
types: [opened, synchronize, ready_for_review, reopened]
8+
# Optional: Only run on specific file changes
9+
# paths:
10+
# - "**/*.java"
11+
# - "**/*.gradle"
12+
# - "**/*.kt"
13+
14+
concurrency:
15+
group: claude-review-${{ github.event.pull_request.number }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
claude-review:
20+
if: ${{ !github.event.pull_request.draft }}
21+
timeout-minutes: 15
22+
runs-on: ubuntu-latest
23+
permissions:
24+
contents: read
25+
pull-requests: write
26+
issues: read
27+
id-token: write
28+
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 #v4.3.1
32+
with:
33+
fetch-depth: 50
34+
35+
- name: Configure AWS Credentials
36+
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 #5.0.0
37+
with:
38+
role-to-assume: ${{ secrets.TELEGEN_AWS_ASSUME_ROLE_ARN }}
39+
aws-region: ${{ vars.AWS_DEFAULT_REGION || 'us-east-1' }}
40+
41+
- name: Run Claude Code Review
42+
id: claude-review
43+
uses: anthropics/claude-code-action@1b422b3517b51140e4484faab676c5e68b914866 #v1.0.73
44+
with:
45+
use_bedrock: "true"
46+
direct_api: "true"
47+
github_token: ${{ secrets.GITHUB_TOKEN }}
48+
claude_args: |
49+
--model us.anthropic.claude-opus-4-6-v1 --allowedTools "Bash(gh pr diff *),Bash(gh pr view *),Bash(gh api repos/*/pulls/*/comments*),Bash(gh api repos/*/pulls/*/reviews*)"
50+
prompt: |
51+
Review this PR for bugs, security issues, and code quality. Post your findings as inline review comments on the relevant lines.

0 commit comments

Comments
 (0)