mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-23 06:54:13 +08:00
- Add PR repository and number to review prompts - Note that PR branch is already checked out - Update allowed tools to use inline comments and gh CLI - Remove experimental review mode example in favor of standardized approach 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <noreply@anthropic.com>
50 lines
1.5 KiB
YAML
50 lines
1.5 KiB
YAML
name: Claude Review - Path Specific
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, synchronize]
|
|
paths:
|
|
# Only run when specific paths are modified
|
|
- "src/**/*.js"
|
|
- "src/**/*.ts"
|
|
- "api/**/*.py"
|
|
# You can add more specific patterns as needed
|
|
|
|
jobs:
|
|
claude-review-paths:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
pull-requests: read
|
|
id-token: write
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: Claude Code Review
|
|
uses: anthropics/claude-code-action@v1-dev
|
|
with:
|
|
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
prompt: |
|
|
REPO: ${{ github.repository }}
|
|
PR NUMBER: ${{ github.event.pull_request.number }}
|
|
|
|
Please review this pull request focusing on the changed files.
|
|
|
|
Note: The PR branch is already checked out in the current working directory.
|
|
|
|
Provide feedback on:
|
|
- Code quality and adherence to best practices
|
|
- Potential bugs or edge cases
|
|
- Performance considerations
|
|
- Security implications
|
|
- Suggestions for improvement
|
|
|
|
Since this PR touches critical source code paths, please be thorough
|
|
in your review and provide inline comments where appropriate.
|
|
|
|
claude_args: |
|
|
--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*), Bash(gh pr diff:*), Bash(gh pr view:*)"
|