Skip to content

Commit f58148c

Browse files
a-simeshinclaude
andauthored
Fix Claude checkout for fork PRs
Use repository and ref from PR head to properly checkout code from fork branches when using pull_request_target. Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 8637471 commit f58148c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ jobs:
2525
- name: Checkout PR code
2626
uses: actions/checkout@v4
2727
with:
28-
ref: ${{ github.event.pull_request.head.sha || github.sha }}
29-
fetch-depth: 1
28+
repository: ${{ github.event.pull_request.head.repo.full_name }}
29+
ref: ${{ github.event.pull_request.head.ref }}
30+
fetch-depth: 20
3031

3132
- name: Run Claude Code Review
3233
uses: anthropics/claude-code-action@v1

0 commit comments

Comments
 (0)