File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111jobs :
1212 claude-review :
1313 # Avoid duplicate runs: use pull_request for same-repo, pull_request_target for forks
14- # Skip bot PRs (dependabot, renovate, etc.) - they don't need code review
14+ # Skip bot PRs (dependabot, renovate, etc.) and draft PRs
1515 if : |
16+ !github.event.pull_request.draft &&
1617 github.event.pull_request.user.type != 'Bot' &&
1718 !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork) &&
1819 !(github.event_name == 'pull_request_target' && !github.event.pull_request.head.repo.fork)
2829 - name : Checkout repository
2930 uses : actions/checkout@v6
3031 with :
31- ref : ${{ github.event.pull_request.head.sha }}
32+ # Use base.sha, not head.sha: checking out fork code under
33+ # pull_request_target would give untrusted code access to secrets.
34+ # Claude reads changes via gh pr diff (API), not the local checkout.
35+ ref : ${{ github.event.pull_request.base.sha }}
3236 fetch-depth : 1
3337
3438 - name : Run Claude Code Review
You can’t perform that action at this time.
0 commit comments