ci: exempt Changesets pre-release (RC) mode from the no-major guard#3342
Merged
Conversation
check-changeset-no-major.mjs scans every pending changeset (not the PR diff), so a single `major` sitting on main reds the "Check Changeset" job on every subsequent PR. During an RC window that major is intentional: in Changesets pre-release mode a `major` only yields a `X.0.0-<tag>.N` pre-release, and nothing final ships until `changeset pre exit`. Detect `.changeset/pre.json` (mode: "pre") and stand the guard aside for the duration, emitting the pending majors as `::notice::` annotations so the RC curator can still eyeball them. The guard re-arms automatically once pre-mode exits, so it keeps protecting the lockstep `fixed` group the rest of the time. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Jul 20, 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.
What
Make the launch-window no-major guard (
scripts/check-changeset-no-major.mjs) stand aside while Changesets is in pre-release (RC) mode.Why
The guard scans every pending changeset in the tree (not the PR diff), so a single
majorchangeset sitting onmainmakes the Check Changeset job red on every subsequent PR that lacks theallow-majorlabel. That is exactly what is happening now:.changeset/remove-session-tenantid-alias.md(#3290) declares threemajorbumps.But the repo is currently in
changeset pre enter rcmode (.changeset/pre.json→"mode": "pre","tag": "rc"). In pre-release mode amajoronly ever produces aX.0.0-rc.Npre-release — nothing final publishes untilchangeset pre exit. Accumulating the next major's breaking changes is precisely what an RC window is for, so the guard should not fight its own release process by reding every PR with a per-PRallow-majortoll.Change
.changeset/pre.jsonexists withmode: "pre", the guard prints the pending majors as::notice::annotations (so the RC curator can still eyeball them) and exits 0 instead of failing.majorstill fails, escape hatch remains theallow-majorlabel.changeset pre exit— zero per-PR maintenance.Verification (local, both branches)
CI-tooling-only change (no publishable package touched) →
skip-changeset.🤖 Generated with Claude Code