Aksel Joonas Reedi commited on
Commit
1f3fd90
·
unverified ·
1 Parent(s): 4e4cabf

ci: add automatic Claude Code review on PRs (#101)

Browse files

* ci: add Claude Code PR review + @claude mention workflows

* ci: add id-token: write permission required by claude-code-action

.github/workflows/claude-review.yml ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Claude PR Review
2
+
3
+ on:
4
+ pull_request:
5
+ types: [opened, synchronize, ready_for_review]
6
+
7
+ permissions:
8
+ contents: read
9
+ pull-requests: write
10
+ issues: read
11
+ id-token: write
12
+
13
+ concurrency:
14
+ group: claude-review-${{ github.event.pull_request.number }}
15
+ cancel-in-progress: true
16
+
17
+ jobs:
18
+ review:
19
+ if: github.event.pull_request.draft == false
20
+ runs-on: ubuntu-latest
21
+ steps:
22
+ - uses: actions/checkout@v4
23
+ with:
24
+ fetch-depth: 0
25
+
26
+ - uses: anthropics/claude-code-action@v1
27
+ with:
28
+ anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
29
+ track_progress: true
30
+ prompt: |
31
+ Review this pull request against the main branch. Focus on:
32
+ - Correctness and likely bugs
33
+ - Security issues (auth, input validation, secrets, injection)
34
+ - Performance regressions, especially in the agent loop and streaming paths
35
+ - Breakages in LiteLLM / Bedrock routing (model ids, params, prompt caching)
36
+ - Test coverage for new behavior
37
+ - Backend/frontend contract drift (FastAPI routes ↔ React client)
38
+
39
+ Be concise. Prefer inline comments over long summaries. Skip nitpicks on
40
+ style that ruff already catches. If the PR looks good, say so briefly
41
+ instead of inventing issues.
.github/workflows/claude.yml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Claude on Mention
2
+
3
+ on:
4
+ issue_comment:
5
+ types: [created]
6
+ pull_request_review_comment:
7
+ types: [created]
8
+ pull_request_review:
9
+ types: [submitted]
10
+ issues:
11
+ types: [opened, assigned]
12
+
13
+ permissions:
14
+ contents: write
15
+ pull-requests: write
16
+ issues: write
17
+ id-token: write
18
+
19
+ jobs:
20
+ claude:
21
+ if: |
22
+ (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
23
+ (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
24
+ (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
25
+ (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
26
+ runs-on: ubuntu-latest
27
+ steps:
28
+ - uses: actions/checkout@v4
29
+ with:
30
+ fetch-depth: 0
31
+
32
+ - uses: anthropics/claude-code-action@v1
33
+ with:
34
+ anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
35
+ track_progress: true