fix(release): wait step uses GITHUB_TOKEN to list drafts#440
Merged
Conversation
…KEN PAT lacks scope)
There was a problem hiding this comment.
Pull request overview
This PR fixes the release pipeline “wait for draft release” step by authenticating the gh api /releases?per_page=100 polling call with the workflow-scoped GITHUB_TOKEN instead of the fine-grained FERRFLOW_TOKEN, avoiding the 403 (“Resource not accessible by personal access token”) seen in v4.7.3 publish runs.
Changes:
- Switch the wait/self-heal step’s
GH_TOKENfromsecrets.FERRFLOW_TOKENtosecrets.GITHUB_TOKEN. - Update the inline rationale comment to document why
GITHUB_TOKENis required for the list-releases polling approach.
There was a problem hiding this comment.
Benchmark
Details
| Benchmark suite | Current: 9fb2031 | Previous: 0b5fe57 | Ratio |
|---|---|---|---|
git_collect_tags/single_tag |
46609 ns/iter (± 184) |
This comment was automatically generated by workflow using github-action-benchmark.
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.
Summary
Follow-up to #439. The wait step still failed for v4.7.3 because
secrets.FERRFLOW_TOKEN(a fine-grained PAT) lacks read scope on/releases?per_page=100— the runner returned403 "Resource not accessible by personal access token"and the self-healgh release creategot the same 403. Verified in v4.7.3's failed Publish run.Fix
Swap the wait step's
GH_TOKENfromFERRFLOW_TOKEN(PAT, no list-releases scope) tosecrets.GITHUB_TOKEN. The job already declarespermissions: contents: writeso the workflow-scoped token CAN list drafts on the repo's own releases.The actual upload + publish steps below keep
FERRFLOW_TOKENbecause:gh release uploaddoesn't need to list (it targets a known tag) and worked previouslyferrflow release(the publish step) needs the bot identity for branch-rule bypass and for ferrflow's own publish_release callTest plan
gh api