ci: enable Claude review workflow for fork PRs#53
Merged
RichardAtCT merged 1 commit intoRichardAtCT:mainfrom Feb 19, 2026
Merged
Conversation
8ca992a to
f49fcc8
Compare
Owner
|
@alexx-ftw This still isn't working. Strange. |
Contributor
Author
|
I investigated this and confirmed the failures are not from the checkout ref change in PR #53. Current failures happen in the Claude action during app token exchange: Examples:
This matches upstream issue anthropics/claude-code-action#713 (OIDC token exchange rejects pull_request_target): So PR #53 is correct in intent (fork-safe trigger model) but not sufficient alone right now because OIDC exchange is failing on pull_request_target. Clean long-term fix:
Why this is clean:
Short-term fallback remains: switch back to pull_request until upstream fixes #713. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes failing
Claude Code Reviewworkflow runs on fork-based pull requests by switching the trigger context topull_request_targetand checking out the PR merge ref explicitly.Root cause
Recent failed runs (for example run
22157347067on PR #40 and run22167207692on PR #41) showed:Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variableCould not fetch an OIDC token. Did you remember to add id-token: write...Even though
id-token: writewas already present, those runs were triggered from fork PRs underpull_requestevent context, where OIDC env vars were not injected in practice for this workflow.Changes
.github/workflows/claude-code-review.ymlon.pull_request->on.pull_request_targetactions/checkoutnow uses:ref: refs/pull/${{ github.event.pull_request.number }}/mergeThis keeps the workflow in base-repo context (enabling OIDC) while still reviewing the PR changes.
Security notes
id-token: write.Validation