ci: grant id-token write to the claude-review workflow - #97
Merged
Merged
Conversation
The Claude review job authenticates via a GitHub OIDC token, which requires
`id-token: write` in the job permissions. Without it anthropics/claude-code-action
fails on every run ("Could not fetch an OIDC token") before it can review or
comment. Add the permission so /claude-review can post its review.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the failing /claude-review workflow by granting the claude job the GitHub OIDC permission (id-token: write) required by anthropics/claude-code-action@v1 to fetch an OIDC token and proceed with posting reviews.
Changes:
- Adds
id-token: writeto thepermissions:block for theclaudejob in the Claude review workflow.
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.
Problem
/claude-reviewruns but fails on every run — it never posts a review. The most recent run on PR #95 (run 27677681190) completed withfailureat the Run Claude Code review step:anthropics/claude-code-action@v1authenticates via a GitHub OIDC token, which requiresid-token: writein the job'spermissions. The job only hadcontents: read,pull-requests: write,issues: write, so the action aborted before it could review or comment.Change
One line — add
id-token: writeto theclaudejob'spermissionsblock in.github/workflows/claude-review.yml.Note
Like any
issue_comment-triggered workflow, this only takes effect once it's on the default branch (main). After merge, a fresh/claude-reviewcomment is needed to re-trigger — the previously failed run does not retry on its own.🤖 Generated with Claude Code