Skip to content

gha: add claude-code-review.yml workflow #1

gha: add claude-code-review.yml workflow

gha: add claude-code-review.yml workflow #1

---
name: claude-code-review
on:
pull_request:
types: [ labeled ]
jobs:
claude-review:
if: github.event.label.name == 'claude-review'
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
issues: write
actions: read
id-token: write
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 1
persist-credentials: false
- run: gh auth setup-git
env:
GH_TOKEN: ${{ github.token }}
- uses: anthropics/claude-code-action@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
allowed_bots: ""
allowed_non_write_users: ""
show_full_output: false
use_commit_signing: true
claude_args: |
--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:*)"
prompt: |
REPO: ${{ github.repository }}
PR NUMBER: ${{ github.event.pull_request.number }}
Please review this pull request with a focus on:
- Code quality and best practices
- Potential bugs or issues
- Security implications
- Performance considerations
Provide detailed feedback using inline comments for specific issues.