Commit 77a527d
authored
Stop checking out the fork PR head in claude-code-review.yml (#53)
actions/checkout refuses to check out a fork PR's head under
pull_request_target by default (a hard-coded safety refusal added in a
patch-level actions/checkout@v4 release), so review never actually ran
against a genuine fork-originated PR — only against
same-repo/upstream-branch PRs, which don't hit this check. The fix is
not to opt back in via allow-unsafe-pr-checkout: true:
claude-code-action already fetches and reads the PR's real content
itself, internally, via the base repo's own refs/pull/<n>/head, so
there's no reason for this job to put the fork's files in the workspace
at all. The checkout step now fetches the base ref only, matching
claude-code-action's own documented recommended pattern.
Note: pull_request_target always runs the workflow file from the base
branch, so this PR's own claude-review check will still run the OLD
broken workflow and fail the same way — that's expected, not a sign the
fix doesn't work. Verification happens on a subsequent PR, after this
merges to master.1 parent f578dc0 commit 77a527d
1 file changed
Lines changed: 11 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
21 | 26 | | |
22 | 27 | | |
23 | 28 | | |
| |||
81 | 86 | | |
82 | 87 | | |
83 | 88 | | |
84 | | - | |
| 89 | + | |
85 | 90 | | |
86 | 91 | | |
87 | | - | |
| 92 | + | |
| 93 | + | |
88 | 94 | | |
89 | 95 | | |
90 | | - | |
91 | | - | |
92 | 96 | | |
93 | 97 | | |
94 | 98 | | |
| |||
0 commit comments