fix(ci): give the @claude mention workflow a usable GitHub token - #182
fix(ci): give the @claude mention workflow a usable GitHub token#182MaryWylde wants to merge 1 commit into
Conversation
The job supplied neither `github_token` nor `id-token: write`, so claude-code-action fell back to minting a token over OIDC and failed all three attempts with "Unable to get ACTIONS_ID_TOKEN_REQUEST_URL". Use the run's own GITHUB_TOKEN, matching claude-code-review.yml in this repo, which avoids depending on the Claude GitHub App being installed on the org. Comment permissions go read -> write so Claude can post replies. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Claude finished @MaryWylde's task in 1m 19s —— View job Review: fix(ci): give the @claude mention workflow a usable GitHub token
SummaryThe core fix is correct: passing The The existing author_association gating (lines 38–50, unchanged by this PR) is sound and untouched — no regression there. One thing worth confirming before merge
If the intent is genuinely review/Q&A only for this trigger, this is a non-issue — otherwise |
| @@ -54,8 +54,10 @@ jobs: | |||
| timeout-minutes: 15 | |||
| permissions: | |||
| contents: read | |||
There was a problem hiding this comment.
contents stays read here while pull-requests/issues go to write. That's enough for Claude to comment, but this workflow (unlike claude-code-review.yml, which never pushes) is the one that handles implementation requests — the task prompt driving @claude on PRs explicitly instructs pushing via git-push.sh origin HEAD using this same github_token.
git push over the default GITHUB_TOKEN needs contents: write; with contents: read that push will get a 403, so "straightforward"/"complex" implementation requests (as opposed to reviews/Q&A) will still fail after this fix, just later in the flow (at push time instead of at token-mint time).
Worth confirming intentional — if this workflow is meant to stay review/answer-only, fine as is; if it's meant to implement and push (per its own trigger prompt), contents needs to be write too.
The job supplied neither
github_tokennorid-token: write, so claude-code-action fell back to minting a token over OIDC and failed all three attempts with "Unable to get ACTIONS_ID_TOKEN_REQUEST_URL".Use the run's own GITHUB_TOKEN, matching claude-code-review.yml in this repo, which avoids depending on the Claude GitHub App being installed on the org. Comment permissions go read -> write so Claude can post replies.