fix(ci): grant the release caller the scopes the shared workflow declares - #845
Merged
Conversation
…ares Pinning to @v2 also moved to the workflow that runs changesets/action v2, which pushes release commits and tags through the GitHub API and so declares contents: write and pull-requests: write. release.yml granted id-token: write and contents: read, and declaring permissions at all drops every unlisted scope to none — a callee asking for more than the caller holds fails the run at startup, which is what main is doing now. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
2 tasks
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
startup_failureonmainfrom #844 (run 32346886564).What broke
Pinning to
@v2did not just rename the action inputs — it moved to the workflow built forchangesets/actionv2, which pushes release commits and tags through the GitHub API rather than the git CLI (push-with-git-clidefaults tofalse). It therefore declares:release.ymlgrantedid-token: writeandcontents: readat the top level. Declaringpermissions:at all replaces the default set, sopull-requestswasnone. A called workflow cannot hold more than its caller, and the run fails at startup — before any job, which is why there are no logs and no annotations.What this does
Declares the three scopes on the
releasejob itself, leaving the top-levelcontents: readin place forverify.docgenneeds no change:pnpm-docs.ymldeclares nopermissionsblock, so its job-levelcontents: writealready covers it.Verifying
The failure is only observable on a push to
main, so this cannot be proven green from a PR — the next push after merge is the test.🤖 Generated with Claude Code