Files
claude-code-action/examples/pr-review-filtered-authors.yml

49 lines
1.6 KiB
YAML

name: Claude Review - Specific Authors
on:
pull_request:
types: [opened, synchronize]
jobs:
review-by-author:
# Only run for PRs from specific authors
if: |
github.event.pull_request.user.login == 'developer1' ||
github.event.pull_request.user.login == 'developer2' ||
github.event.pull_request.user.login == 'external-contributor'
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Review PR from Specific Author
uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
prompt: |
REPO: ${{ github.repository }}
PR NUMBER: ${{ github.event.pull_request.number }}
Please provide a thorough review of this pull request.
Note: The PR branch is already checked out in the current working directory.
Since this is from a specific author that requires careful review,
please pay extra attention to:
- Adherence to project coding standards
- Proper error handling
- Security best practices
- Test coverage
- Documentation
Provide detailed feedback and suggestions for improvement.
claude_args: |
--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*), Bash(gh pr diff:*), Bash(gh pr view:*)"