Skip to content

Commit 072c7ec

Browse files
bloveclaude
andauthored
fix(ci): post Claude review via GITHUB_TOKEN instead of failing OIDC (#703)
The Claude Review workflow passed anthropic_api_key but no github_token, so claude-code-action fell through to minting a GitHub App token via OIDC (setupGitHubToken → getOidcToken). That path needs the Claude GitHub App installed on the repo and failed on every PR with "Could not fetch an OIDC token", so the advisory review never ran. Pass github_token: ${{ secrets.GITHUB_TOKEN }} (mapped to OVERRIDE_GITHUB_TOKEN by the action), which skips OIDC and posts review comments using the workflow's own token — the job already has pull-requests: write. Drop the now -unused id-token: write permission. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 335ebea commit 072c7ec

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/claude-review.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ jobs:
1818
timeout-minutes: 15
1919
permissions:
2020
contents: read
21-
pull-requests: write
22-
id-token: write # claude-code-action mints its GitHub token via OIDC
21+
pull-requests: write # posts review comments via the default GITHUB_TOKEN
2322
steps:
2423
- name: Checkout
2524
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -30,6 +29,11 @@ jobs:
3029
uses: anthropics/claude-code-action@806af32823ef69c8ef357086c573a902af641307 # v1
3130
with:
3231
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
32+
# Post as the workflow's own GITHUB_TOKEN. Without this the action
33+
# falls back to minting a GitHub App token via OIDC, which requires
34+
# the Claude GitHub App installed on the repo and fails otherwise
35+
# ("Could not fetch an OIDC token").
36+
github_token: ${{ secrets.GITHUB_TOKEN }}
3337
track_progress: true
3438
prompt: |
3539
REPO: ${{ github.repository }}

0 commit comments

Comments
 (0)