Commit b9ff3b6
[.github] Fix claude-review for fork PRs — fetch via refs/pull/N/head
claude-code-action@v1 does `git fetch origin <branch-name>` internally,
which fails for fork PRs because the branch doesn't exist on origin.
Fix: pre-fetch the PR code via GitHub's refs/pull/N/head ref (works for
all PRs regardless of fork status) and check it out on a local branch
with the expected name before the action runs.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 2d3a834 commit b9ff3b6
1 file changed
Lines changed: 19 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | 32 | | |
34 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
35 | 52 | | |
36 | 53 | | |
37 | 54 | | |
| |||
0 commit comments