Correct the merge advice for a library release - #14
Merged
Merged
Conversation
The note added with 0.2.0 said the merge in step 4 "needs `gh pr merge --admin`". It was written from the shape of the problem rather than from having run it, and when it was run the merge came back with `Required status check "package verifies" is failing` despite the account holding admin on the repository. The reason is that `main` is protected by a ruleset, not by classic branch protection, and the two differ exactly here: a ruleset grants bypass only to the actors named in `bypass_actors`, so an empty list refuses a repository admin like anyone else. Whether `--admin` works is therefore a property of the ruleset's configuration and not of who is running it, which is worth a reader checking rather than assuming. The section now gives both routes and what each costs. The second one is worth having written down even where the bypass is available: dispatching the release job against the branch publishes the version, which turns the one red check green on its own and lets the pull request merge with no bypass at all. That is safe to follow with a tag on `main` because the publish step already asks the sparse index whether the version exists and skips it if so -- the idempotence that was put there for re-running a failed release turns out to make this ordering work too.
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.
The note added with 0.2.0 said the merge in step 4 "needs
gh pr merge --admin". It was written from the shape of the problemrather than from having run it, and when it was run the merge came back
with
Required status check "package verifies" is failingdespite theaccount holding admin on the repository.
The reason is that
mainis protected by a ruleset, not by classicbranch protection, and the two differ exactly here: a ruleset grants
bypass only to the actors named in
bypass_actors, so an empty listrefuses a repository admin like anyone else. Whether
--adminworks istherefore a property of the ruleset's configuration and not of who is
running it, which is worth a reader checking rather than assuming.
The section now gives both routes and what each costs. The second one is
worth having written down even where the bypass is available: dispatching
the release job against the branch publishes the version, which turns the
one red check green on its own and lets the pull request merge with no
bypass at all. That is safe to follow with a tag on
mainbecause thepublish step already asks the sparse index whether the version exists and
skips it if so -- the idempotence that was put there for re-running a
failed release turns out to make this ordering work too.