Update claude-code-review.yml (#880)
This commit is contained in:
parent
c5df6b591f
commit
3dc2857077
1 changed files with 23 additions and 18 deletions
41
.github/workflows/claude-code-review.yml
vendored
41
.github/workflows/claude-code-review.yml
vendored
|
|
@ -1,45 +1,50 @@
|
||||||
name: Claude Code Review
|
name: Claude PR Auto Review
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, synchronize]
|
types: [opened, synchronize]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
claude-review:
|
auto-review:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
pull-requests: write
|
pull-requests: read
|
||||||
issues: read
|
|
||||||
id-token: write
|
id-token: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
- name: Run Claude Code Review
|
- name: Automatic PR Review
|
||||||
id: claude-review
|
|
||||||
uses: anthropics/claude-code-action@v1
|
uses: anthropics/claude-code-action@v1
|
||||||
with:
|
with:
|
||||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||||
|
use_sticky_comment: true
|
||||||
allowed_bots: "dependabot"
|
allowed_bots: "dependabot"
|
||||||
|
|
||||||
# Direct prompt for automated review (no @claude mention needed)
|
|
||||||
prompt: |
|
prompt: |
|
||||||
Please review this pull request and provide feedback on:
|
REPO: ${{ github.repository }}
|
||||||
|
PR NUMBER: ${{ github.event.pull_request.number }}
|
||||||
|
|
||||||
|
Please review this pull request.
|
||||||
|
|
||||||
|
Note: The PR branch is already checked out in the current working directory.
|
||||||
|
|
||||||
|
Focus on:
|
||||||
- Code quality and best practices
|
- Code quality and best practices
|
||||||
- Potential bugs or issues
|
- Potential bugs or issues
|
||||||
- Performance considerations
|
- Performance considerations
|
||||||
- Security concerns
|
- Security implications
|
||||||
- Test coverage
|
- Test coverage
|
||||||
|
- Documentation updates if needed
|
||||||
|
- Verify that README.md and docs are updated for any new features or config changes
|
||||||
|
|
||||||
Be constructive and helpful in your feedback.
|
Provide constructive feedback with specific suggestions for improvement.
|
||||||
|
Use `gh pr comment:*` for top-level comments.
|
||||||
use_sticky_comment: true
|
Use `mcp__github_inline_comment__create_inline_comment` to highlight specific areas of concern.
|
||||||
|
Only your GitHub comments that you post will be seen, so don't submit your review as a normal message, just as comments.
|
||||||
if: |
|
If the PR has already been reviewed, or there are no noteworthy changes, don't post anything.
|
||||||
!contains(github.event.pull_request.title, '[skip-review]') &&
|
|
||||||
!contains(github.event.pull_request.title, '[WIP]')
|
|
||||||
|
|
||||||
|
claude_args: |
|
||||||
|
--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*), Bash(gh pr diff:*), Bash(gh pr view:*)"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue