ci(release): suppress per-PR success comments on prereleases#3337
Merged
Conversation
After a real (non-squash) merge of stable into main, semantic-release re-attributes prereleases to every PR already shipped on @latest. Without this gate each one gets a duplicate "shipped in next" comment on both GitHub and Linear. Adds `shouldCommentOnRelease = !isPrerelease` to the nine releasercs that use @semantic-release/github or semantic-release-linear-app. GitHub uses `successCommentCondition: shouldCommentOnRelease ? undefined : false` so stable behavior is unchanged. Linear mirrors with `addComment: shouldCommentOnRelease`; labels and version bookkeeping still run on prereleases by design. Regression test pins the exact pattern across all nine configs.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
|
🎉 This PR is included in superdoc-sdk v1.10.0 |
Contributor
|
🎉 This PR is included in @superdoc-dev/mcp v0.6.0 The release is available on GitHub release |
Contributor
|
🎉 This PR is included in superdoc v1.34.0 The release is available on GitHub release |
Contributor
|
🎉 This PR is included in @superdoc-dev/react v1.5.0 The release is available on GitHub release |
Contributor
|
🎉 This PR is included in vscode-ext v2.6.0 |
Contributor
|
🎉 This PR is included in template-builder v1.11.1 The release is available on GitHub release |
Contributor
|
🎉 This PR is included in esign v2.7.1 The release is available on GitHub release |
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.
Gates the GitHub plugin's
successCommentand the Linear plugin'saddCommentso prerelease runs don't post duplicate "shipped in next" comments. The trigger for this is the upcoming stable -> main recovery merge: once it lands as a real merge, semantic-release will re-attribute prereleases to every PR already shipped on @latest, and without this gate each one gets two redundant notifications.const shouldCommentOnRelease = !isPrerelease;to the nine releasercs that load@semantic-release/githuborsemantic-release-linear-app.successCommentCondition: shouldCommentOnRelease ? undefined : false. Stable falls through to the existing template, prereleases skip.addComment: shouldCommentOnRelease. Labels and version bookkeeping still run on prereleases by design.Review: this is step 1 of the recovery for the stable→main ancestry break; the rest (sync-patches.yml using a real merge, ruleset on main, recovery PR) lands separately.
Verified:
node --checkon all nine releasercs; runtime require under bothGITHUB_REF_NAME=mainand=stablereturns the expected values;node --test scripts/__tests__/release-local.test.mjsadds one new passing test, two pre-existing failures unrelated to this change (SSH URL rewrite, release-esign.yml shared workspace).