build: fix claude-code-action OIDC error in pr-review workflow#2808
Open
RabbiIslamRony wants to merge 8 commits intosovware:developmentfrom
Open
build: fix claude-code-action OIDC error in pr-review workflow#2808RabbiIslamRony wants to merge 8 commits intosovware:developmentfrom
RabbiIslamRony wants to merge 8 commits intosovware:developmentfrom
Conversation
…gger-v2 fix: remove branches filter from pr-review workflow trigger
- Switch from deprecated @beta to @v1 - Use pull_request event (pull_request_target was silently not firing) - Replace direct_prompt with prompt (v1 API) - Remove id-token: write and github_token (not needed with API key auth) - Skip draft PRs, add reopened/ready_for_review triggers Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The claude-code-action was failing with "Could not fetch an OIDC token" because no github_token was provided and id-token:write was missing. Instead of adding OIDC, pass GITHUB_TOKEN explicitly which is simpler and requires no extra setup. Also adds pull_request_review_comment trigger and removes unnecessary checkout step. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
PR Type
Summary
Fixes the Claude Code PR review workflow by passing
GITHUB_TOKENexplicitly instead of relying on OIDC authentication. Also improves trigger configuration and removes unnecessary checkout step.What Changed
Function Changes
github_token: ${{ secrets.GITHUB_TOKEN }}to bypass OIDC authenticationcontentspermission fromreadtowritepull_request_review_commenttrigger for inline @claude mentionspull_request_review_commentevent in jobifblockactions/checkout@v4step (action handles checkout internally)UX Changes
UI Changes
Files Changed
Config / CI
.github/workflows/pr-review.yml— Fix authentication, add trigger, remove redundant checkoutHow to Test
trunkANTHROPIC_API_KEY_PR_REVIEWsecret exists in repo Settings → Secrets → Actionstrunkwith a small code changeClaude Code Reviewworkflow triggers and completes without errors@claudeon a PR review comment to test inline triggerAny linked issues
Fixes #
Checklist
Additional Context