Skip to content

Commit c6bf004

Browse files
committed
gha: add claude-code-review.yml workflow
1 parent 267115c commit c6bf004

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
name: claude-code-review
3+
on:
4+
pull_request:
5+
types: [ labeled ]
6+
jobs:
7+
claude-review:
8+
if: github.event.label.name == 'claude-review'
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
12+
pull-requests: write
13+
issues: write
14+
actions: read
15+
id-token: write
16+
steps:
17+
- uses: actions/checkout@v6
18+
with:
19+
fetch-depth: 1
20+
persist-credentials: false
21+
- run: gh auth setup-git
22+
env:
23+
GH_TOKEN: ${{ github.token }}
24+
- uses: anthropics/claude-code-action@v1
25+
env:
26+
GITHUB_TOKEN: ${{ github.token }}
27+
with:
28+
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
29+
allowed_bots: ""
30+
allowed_non_write_users: ""
31+
show_full_output: false
32+
use_commit_signing: true
33+
claude_args: |
34+
--max-turns 3 --disallowed-tools "Bash,WebFetch,WebSearch" --allowed-tools "WebFetch(domain:docs.redpanda.com),Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"
35+
prompt: |
36+
REPO: ${{ github.repository }}
37+
PR NUMBER: ${{ github.event.pull_request.number }}
38+
39+
Please review this pull request with a focus on:
40+
- Code quality and best practices
41+
- Potential bugs or issues
42+
- Security implications
43+
- Performance considerations
44+
45+
Provide detailed feedback using inline comments for specific issues.

0 commit comments

Comments
 (0)