fix(ci): fix claude-pr-review failing on fork PRs#829
fix(ci): fix claude-pr-review failing on fork PRs#829diegomrsantos wants to merge 1 commit intosigp:stablefrom
Conversation
claude-code-action@v1 recently changed (PR #851) to fetch PR branches via `git fetch origin pull/N/head:...` before calling configureGitAuth(). This requires origin to point to the base repo with a token that can access fork PR refs. Fix by: - Removing fork-specific repository/ref overrides from checkout - Generating the app token before checkout and passing it via token: Cherry-pick of sigp#827 and sigp#828 from unstable. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
I'll analyze this and get back to you. |
shane-moore
left a comment
There was a problem hiding this comment.
LGTM. Root cause was anthropics/claude-code-action@v1 updating to v1.0.48 on Feb 10, which changed PR checkout from git fetch origin <branch-name> to git fetch origin pull/N/head:..... The new approach assumes origin is the base repo, but our workflow was overriding it to the fork. The app token change is fine but the real fix is removing the fork-specific checkout overrides imo
|
regarding the CI failures:
|
|
ran this flow locally w/o issue to prove to myself we wouldn't see merge issues later:
|
|
Closing this since claude has resolve the issue on their end anthropics/claude-code-action#931 |
Imo it's better to use fixed versions for everything, so we avoid disruptions lile that. It consumes time and it's not the first time it happens |

Issue Addressed
claude-pr-reviewfails on all fork PRs since Feb 11 with:pull_request_targetreads workflow files from the default branch (stable), so this fix must land here.Proposed Changes
repository/refoverrides from checkout (origin must point to base repo where PR refs live)token:Root cause:
claude-code-action@v1merged anthropics/claude-code-action#851 on Feb 10, changing branch fetch fromgit fetch origin <branchName>togit fetch origin pull/N/head:<branchName>. The action callssetupBranch()beforeconfigureGitAuth(), so it uses the token embedded byactions/checkout. The defaultgithub.tokencannot fetch fork PR refs.Additional Info
unstablevia fix(ci): fix claude-pr-review checkout for fork PRs #827 and fix(ci): use app token for checkout in claude-pr-review #828 but had no effect sincepull_request_targetreads fromstablegithub.tokencan access those refs