Repository navigation
chore(tooling): cut releases through a pull request, tag after the merge - #65
Merged
Merged
Conversation
The `Main branch` ruleset refuses every direct push to `main` — including the
release commit — with `422 Changes must be made through a pull request`, and
the owner's bypass (`bypass_mode: pull_request`) covers merging a PR, not
pushing one. `bumpp`'s default flow pushed the release commit and its tag
straight to `main`, so the next release would have failed at the push.
Releases now use bumpp's `--pr` mode: commit on `release/v<version>`, push that
branch, open the PR. `pr.base` is pinned to `main` because bumpp otherwise
derives the base from `origin/HEAD`, which still said `master` in this clone —
with the wrong base, its precondition check refuses to run at all.
The tag moves to `pnpm release:tag` (`scripts/release-tag.mjs`), run on the
updated `main` after the merge. bumpp's PR mode creates no tag by design: it
cannot know the merge commit, and a squash or rebase merge rewrites the release
commit, so a tag made on the branch would point at a commit that never lands on
`main`. The script refuses a dirty tree, a branch other than `main`, a `main`
out of sync with `origin/main`, and an existing tag; `--no-push` rehearses.
`package.json` passes `-a --commit "chore(release): {version}"` on the command
line rather than relying on the config file: bumpp's CLI defaults win over the
config's object form, which is why v1.1.0 was committed as
`chore: release v1.1.0` despite `commit: { message }` in `bump.config.ts`.
`docs/agents/release.md` is rewritten to match — it documented the direct push
that the gate now refuses.
Contributor
Coverage
|
Contributor
|
Loop triage — This is an owner-authored, same-repo PR that changes the norms layer ( Verified read-only — the change checks out
No |
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.
Problem
A release is a change to
main, andmainonly moves through a pull request: theMain branchruleset refuses a direct push with422 Changes must be made through a pull request, for every credential, the owner's included. What the owner's bypass (bypass_mode: pull_request) buys is merging a PR without a second reviewer — which is what makes a solo release possible — not pushing one.bumpp's default flow pushed the release commit and its tag straight tomain, so the next release would have failed at the push. The previous release (v1.1.0, 2026-09-04) predates the gate: it was cut on 2026-09-04, before the ruleset became the boundary on 2026-09-15.Changes
bump.config.ts— releases run in bumpp'sprmode: commit onrelease/v{version}, push that branch, open the PR.pr.baseis pinned tomainbecause bumpp otherwise derives the base fromorigin/HEAD, which still saidmasterin a clone made before the rename; with the wrong base its precondition check refuses to run at all.package.json—pnpm releasepasses-a --commit "chore(release): {version}"on the command line; newpnpm release:tag.scripts/release-tag.mjs— tags the merged release commit onmain. bumpp's PR mode creates no tag by design: it cannot know the merge commit, and a squash or rebase merge rewrites the release commit, so a tag made on the branch would point at a commit that never lands onmain. The script refuses a dirty tree, a branch other thanmain, amainout of sync withorigin/main, and an existing tag;--no-pushrehearses.docs/agents/release.md— rewritten around the PR flow, including the gotcha below. Norms layer, hence the PR.Why the commit message left the config file: bumpp's CLI defaults (
--commit,--all) win over the config's object form, socommit: { message }inbump.config.tsis silently replaced by the defaultchore: release v<version>— which is exactly how v1.1.0 was committed, config and all.-ais passed for the same reason.Verification
Full rehearsal against the real repository, then reverted.
pnpm release --release patch --yesonmain(with this branch merged locally) createdrelease/v1.1.1, committedchore(release): 1.1.1with the regeneratedCHANGELOG.md, pushed the branch and opened #64 — basemain, titlechore(release): 1.1.1, body1.1.0 → 1.1.1, and no tag, as designed.#64and its branch were then closed and deleted, andmainreset toorigin/main.scripts/release-tag.mjsexercised in a throwaway clone with a local bare remote (no GitHub writes):main, in sync, tag absentv1.1.0created and pushedtag v1.1.0 already existsotheron "other", expected "main"the working tree is not cleanmainahead of its remotelocal main is not in sync with origin/mainGates on the rebased branch (rebased onto the merged #63):
pnpm lint→ 0 warnings / 0 errors,pnpm check:typesclean,pnpm fmt:checkclean.