Skip to content

feat: auto-close promoted channel release PRs#115

Merged
theoephraim merged 2 commits into
mainfrom
feat/auto-close-promoted-release-pr
Jun 13, 2026
Merged

feat: auto-close promoted channel release PRs#115
theoephraim merged 2 commits into
mainfrom
feat/auto-close-promoted-release-pr

Conversation

@theoephraim

@theoephraim theoephraim commented Jun 13, 2026

Copy link
Copy Markdown
Member

Dogfood finding from the first promotion: after merging #110, the channel release PR #112 lingered open, offering to publish another rc of a cycle that had already moved to its stable release (#114). I closed it manually; this makes bumpy do it.

When: as part of creating/updating the destination's version PR —

  • stable version PR on main whose plan includes channel-dir bump files (promotion), and
  • channel release PR creation that moved files from other channels (graduation, e.g. alphabeta).

What: for each promoted source channel, look up an open PR on its versionPr.branch head and close it with a comment explaining why, noting a fresh release PR appears if more work lands on the channel. Failures are warn-only — a lingering PR is annoying, not dangerous. The current channel's own PR is explicitly never touched.

Targeting main (rather than next) deliberately: this path executes via the published bumpy in the release workflow, so shipping it in 1.14.0 activates it for the next cycle's promotion — and next is due for its post-promotion reset anyway. The bump file will fold into #114.

Docs updated in the promotion section. 297 tests pass.


Update — race fix (b13e94d): the first cut closed the source channel's release PR whenever its bump files were pending on the destination, but promoted files stay pending until the destination's version/release PR merges (potentially days). If a user started a fresh next cycle in that window, an unrelated merge to main would close its legitimate release PR — then the next push to next recreates it, and the cycle repeats (close → recreate ping-pong).

Now the close is gated on the triggering push actually adding files under .bumpy/<channel>/ (its before..after range — the same detection the channel publish trigger uses), so it fires exactly once, on the promotion/graduation merge itself. Moved both call sites to after the checkout-back so the non-CI fallback (HEAD^..HEAD) diffs the triggering commit from the right branch.

Thanks to @theoephraim for spotting the restarted-cycle race.

When a cycle promotes (channel → main) or graduates (channel → channel), an
open release PR on the source channel offers another prerelease of a cycle
that already moved on. Close it with an explanatory comment when the
destination's version/release PR is created; a fresh one is created if new
work lands on the channel.
@github-actions

github-actions Bot commented Jun 13, 2026

Copy link
Copy Markdown

bumpy-frog

The changes in this PR will be included in the next version bump.

patch Patch releases

  • @varlock/bumpy 1.13.2 → 1.13.3

Bump files in this PR

Click here if you want to add another bump file to this PR


This comment is maintained by bumpy.

Promoted bump files stay pending on the destination branch until its
version/release PR merges. Closing on every push in that window would kill
the release PR of a newly restarted cycle (close → recreate ping-pong).
Gate the close on the triggering push's before..after range actually adding
files under .bumpy/<channel>/ — the same detection the channel publish
trigger uses. Runs from the destination branch so the non-CI fallback
(HEAD^..HEAD) diffs the triggering commit.
@theoephraim theoephraim merged commit d687bef into main Jun 13, 2026
5 checks passed
theoephraim added a commit that referenced this pull request Jun 13, 2026
…ior (#116)

Doc gaps surfaced while dogfooding the `next` channel to completion.
Docs-only; no bump file (nothing under `packages/` changes).

**Release workflow examples (`github-actions.md`)** — both the
split-jobs and single-job examples now:
- comment that prerelease channel branches go in the `push` trigger too
(`[main, next, beta]`), with a link to the channels doc, and
- use a **per-ref concurrency group** (`bumpy-release-${{ github.ref
}}`). With a single shared group, a `next` prerelease publish queues
behind — or, with `cancel-in-progress: true`, gets cancelled by — a
`main` release, despite touching different dist-tags. This is the exact
lesson from our own `release.yaml`. The standalone **Concurrency**
section now explains the why, and notes the plain group is equivalent if
you only release from `main`.

**`prereleases.md` setup** — the "only trigger change" line now also
flags that an _existing_ workflow on a single concurrency group should
switch to per-ref (new workflows get it from the example).

**`cli.md`** — documents what `ci check` posts on channel PRs
(prerelease plan, `-<preid>.x`, dist-tag) and on **promotion PRs**
(reads `.bumpy/<channel>/`, shows the consolidated stable plan, calls
out that merging ends the cycle) — behavior that shipped in #111/#113
but wasn't in the command reference.

Not included here: the auto-close-promoted-release-PR docs ride with
#115; nothing here references that unmerged behavior.
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