SK-2986 use PAT for release version-bump push to bypass branch protection#271
Merged
Merged
Conversation
…tion Branch-protection rulesets now enforce PR + approval + a build status check on main (staged). The automated version-bump commit is pushed directly to main as github-actions[bot], which is not a ruleset bypass actor, so the push would be rejected. Point the release checkout at PAT_ACTIONS (a repo-admin credential) so its token is persisted and reused for the push, satisfying the ruleset's repo-admin bypass. Co-Authored-By: Claude Opus 4.8 (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.
Why
Branch-protection rulesets now cover
main(force-push/deletion active; PR + build-check staged). The automated release version-bump commit is pushed directly tomainasgithub-actions[bot], which is not a ruleset bypass actor — so once PR enforcement is activated the push would be rejected and releases would break.What
Point the release
actions/checkoutatPAT_ACTIONS(a repo-admin credential).checkoutpersists it and the later bump push reuses it, satisfying the ruleset Repository Admin bypass.Confirm this repo's
PAT_ACTIONSis owned by a repo admin with Contents: write (it is a per-repo secret). If not, pointtoken:at a write-capable admin PAT/App. Alternative discussed in the java rollout: drop the version-bump push entirely so no bypass is needed.Part of the SDK branch-protection rollout. Ref: SK-2986
🤖 Generated with Claude Code