File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Claude Code Review
22
3- # pull_request_target runs in the context of the BASE repo (not the fork),
4- # giving access to secrets even for PRs from forks.
5- # Security note: the checkout below intentionally uses the base branch ref,
6- # NOT the fork's code, to avoid executing untrusted code with repo secrets.
73on :
8- pull_request_target :
4+ pull_request :
95 types : [opened, synchronize, ready_for_review, reopened]
6+ # Optional: Only run on specific file changes
7+ # paths:
8+ # - "src/**/*.ts"
9+ # - "src/**/*.tsx"
10+ # - "src/**/*.js"
11+ # - "src/**/*.jsx"
1012
1113jobs :
1214 claude-review :
15+ # Optional: Filter by PR author
16+ # if: |
17+ # github.event.pull_request.user.login == 'external-contributor' ||
18+ # github.event.pull_request.user.login == 'new-developer' ||
19+ # github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
20+
1321 runs-on : ubuntu-latest
1422 permissions :
1523 contents : read
16- pull-requests : write
17- issues : write
24+ pull-requests : read
25+ issues : read
1826 id-token : write
1927
2028 steps :
21- - name : Checkout base repository
29+ - name : Checkout repository
2230 uses : actions/checkout@v4
2331 with :
24- # Explicitly checkout the base branch, not the fork's code.
25- # This is required when using pull_request_target with fork PRs.
26- ref : ${{ github.event.pull_request.base.sha }}
2732 fetch-depth : 1
2833
2934 - name : Run Claude Code Review
3641 prompt : ' /code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'
3742 # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
3843 # or https://code.claude.com/docs/en/cli-reference for available options
44+
Original file line number Diff line number Diff line change 4646 # Optional: Add claude_args to customize behavior and configuration
4747 # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
4848 # or https://code.claude.com/docs/en/cli-reference for available options
49- # claude_args: '--allowed-tools Bash(gh pr: *)'
49+ # claude_args: '--allowed-tools Bash(gh pr *)'
5050
You can’t perform that action at this time.
0 commit comments