Skip to content

Commit cb65cdb

Browse files
committed
Updated the claude-code-review instructions
1 parent c4da946 commit cb65cdb

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/claude-code-review.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ on:
1111
jobs:
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)
@@ -28,7 +29,10 @@ jobs:
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

0 commit comments

Comments
 (0)