Repository navigation
Create the release PR with the built-in token instead of a PAT - #363
Merged
Merged
Conversation
The Release Stable workflow used secrets.PAT only to open and auto-merge the release PR. The PAT expired, which failed the 1.1.3 release at that step. Use github.token instead, and dispatch the Build workflow on the release branch: pushes and PRs made with the built-in token don't trigger workflows, but workflow_dispatch does, and main requires the Build check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pcdeshmukh
approved these changes
Dec 2, 2026
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 Release Stable workflow used
secrets.PATfor one thing: opening the "Release X" PR and enabling auto-merge. The PAT (from 2024-06) had expired, so the 1.1.3 release failed at "Create GitHub PR" with HTTP 401, and the PR (#362) and draft release had to be created by hand.This switches that step to the built-in
github.token, so there is no personal token to keep alive.Why it isn't just a token swap
mainrequires the Build status check. Pushes and PRs made with the built-in token don't trigger workflows, so Build would never run on the release branch and auto-merge would wait forever.workflow_dispatchis the exception, so the step now runsgh workflow run build.yml --ref "$PR_BRANCH_NAME"(build.ymlalready hasworkflow_dispatch). The dispatched run reports Build on the branch's head commit, which satisfies the required check. That needsactions: write, added to the workflow's permissions.Repo settings already allow the rest: "Allow GitHub Actions to create and approve pull requests" is on, and auto-merge with rebase is enabled.
Behaviour changes
github-actions[bot]. You can approve it yourself, which you couldn't do while the PR was authored by the PAT's owner.maincomes from the built-in token, so thepushBuild onmainwon't run for that merge commit. The nightly scheduled Build still coversmain.Testing
actionlint(v1.7.12) reports no new findings; the only output is shellcheck quoting notes thatmainalready has.After merging
Delete the
PATrepository secret; nothing else uses it (grepover.github/workflows).🤖 Generated with Claude Code