ci: fix Claude auto-review auth (use github_token, skip OIDC exchange)#8
Merged
jnasbyupgrade merged 2 commits intoJul 14, 2026
Conversation
The pull_request_target review 401s exchanging its OIDC token for a GitHub App token. Supplying github_token makes the action use it directly and skip that exchange. Drops the now-unneeded id-token: write. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Poll the PR head's check-runs before the paid review and only run it when all sibling checks are clean (or none exist after a short grace window). Excludes this workflow's own check-run (claude-review) and treats a poll timeout as skip. Uniform across repos: sibling checks are discovered dynamically, no per-repo workflow-name hardcoding. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
04827a1
into
Postgres-Extensions:master
1 of 2 checks passed
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.
Fixes the Claude auto-review and makes it cost-aware.
Auth fix. The
pull_request_targetreview was failing with401 - Invalid OIDC token(the action's OIDC→GitHub-App-token exchange, which is tied to the triggering actor's permissions). Passinggithub_token: ${{ secrets.GITHUB_TOKEN }}makes the action skip that exchange and use the workflow token directly — repo/workflow-scoped, independent of any user's role. Also drops the now-unneededid-token: write.Cost gate. The paid review now runs last: a pre-step waits for the PR's other check-runs to finish and only runs Claude if they all pass. If any sibling check failed (or CI times out), the review is skipped — no spend reviewing a PR that's already broken.
Note:
pull_request_targetruns the workflow from the base branch, so this PR's own review check still runs the old master workflow (will fail auth) — the fix only takes effect once merged.