fix: use GITHUB_TOKEN for PR creation in tag-release#13
Merged
brayniac merged 1 commit intoiopsystems:mainfrom Apr 21, 2026
Merged
fix: use GITHUB_TOKEN for PR creation in tag-release#13brayniac merged 1 commit intoiopsystems:mainfrom
brayniac merged 1 commit intoiopsystems:mainfrom
Conversation
The RELEASE_TOKEN PAT has contents: write (so tag/branch pushes can trigger downstream workflows) but lacks the pull_requests scope. The job-level permissions block only configures GITHUB_TOKEN; it does not grant scopes to PATs. Use GITHUB_TOKEN for gh pr create, keeping RELEASE_TOKEN for pushes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
The v2.0.0 release surfaced a token-permissions bug in
tag-release.yml: the tag push and crates.io publish succeeded, but the automated dev-version bump PR failed to open:Root cause
The workflow uses
RELEASE_TOKEN(a PAT) forgh pr createso that pushes can trigger downstream workflows — PATs withcontents: writedo, butGITHUB_TOKENdoesn't. However, the job-levelpermissions: pull-requests: writeonly configuresGITHUB_TOKEN; it has no effect on PATs. TheRELEASE_TOKENPAT was never grantedpull_requestsscope.Fix
Use
GITHUB_TOKEN(which haspull-requests: writefrom the job'spermissionsblock) only forgh pr create. KeepRELEASE_TOKENfor all git pushes so tag and branch pushes continue to trigger their downstream workflows.One-line env change plus a comment explaining the split.
Test plan
🤖 Generated with Claude Code