Skip to content

fix(tag): use GITHUB_TOKEN, not the release PAT - #192

Merged
stozo04 merged 1 commit into
mainfrom
fix/tag-uses-github-token
Sep 8, 2026
Merged

fix(tag): use GITHUB_TOKEN, not the release PAT#192
stozo04 merged 1 commit into
mainfrom
fix/tag-uses-github-token

Conversation

@stozo04

@stozo04 stozo04 commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Run 34238237358 got through every check — sha verified, version matched, bundle present and still signing-verified — then failed at the last step:

HTTP 403: Resource not accessible by personal access token
https://api.github.com/repos/stozo04/OpenLoop/releases

My design error. tag.yml preferred RELEASE_TOKEN whenever it was set, which handed a job that never needed the PAT a credential weaker than the one it already had. Run 2 creates a tag and a release: tags aren't covered by the branch ruleset, and this workflow already declares permissions: contents: write, so GITHUB_TOKEN is both sufficient and the right token for the job.

Now uses github.token for both checkout and gh, with a comment at the top of the file saying why the PAT is deliberately absent — so nobody "fixes" it back later.

On why the PAT was refused: GitHub documents fine-grained Contents-write as covering releases, and this same token pushed a branch and merged a PR in run 1, so I can't fully explain the 403 and I'm not going to pretend otherwise. It doesn't need explaining to be fixed — run 2 shouldn't have been using that token regardless, and narrowing the PAT to the single step that can't work without it is the right shape independent of this bug.

No 1.0.52 tag exists, so the failed run left nothing behind. Safe to re-dispatch with the same inputs.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Miqsf1M14nY5TKiZHzyjNY

Run 34238237358 reached `gh release create` and got
"HTTP 403: Resource not accessible by personal access token".

This workflow preferred RELEASE_TOKEN whenever it was set, which handed a job
that never needed the PAT a credential weaker than the one it already had.
Run 2 creates a tag and a release; tags are not covered by the branch ruleset,
and this workflow already declares permissions: contents: write, so
GITHUB_TOKEN is both sufficient and the right token for the job.

RELEASE_TOKEN stays in release.yml, where the merge genuinely needs to bypass
the ruleset. Narrowing where the PAT is used is the correct direction anyway —
it should be reachable by exactly the one step that cannot work without it.
@stozo04
stozo04 merged commit 1e0ecf5 into main Sep 8, 2026
2 checks passed
@stozo04
stozo04 deleted the fix/tag-uses-github-token branch September 8, 2026 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant