Skip to content

ci(release): suppress per-PR success comments on prereleases#3337

Merged
caio-pizzol merged 4 commits into
mainfrom
caio/suppress-prerelease-comments
May 16, 2026
Merged

ci(release): suppress per-PR success comments on prereleases#3337
caio-pizzol merged 4 commits into
mainfrom
caio/suppress-prerelease-comments

Conversation

@caio-pizzol
Copy link
Copy Markdown
Contributor

Gates the GitHub plugin's successComment and the Linear plugin's addComment so 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.

  • Adds const shouldCommentOnRelease = !isPrerelease; to the nine releasercs that load @semantic-release/github or semantic-release-linear-app.
  • GitHub: successCommentCondition: shouldCommentOnRelease ? undefined : false. Stable falls through to the existing template, prereleases skip.
  • Linear: addComment: shouldCommentOnRelease. Labels and version bookkeeping still run on prereleases by design.
  • Regression test scans all nine configs and asserts the exact pattern.

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 --check on all nine releasercs; runtime require under both GITHUB_REF_NAME=main and =stable returns the expected values; node --test scripts/__tests__/release-local.test.mjs adds one new passing test, two pre-existing failures unrelated to this change (SSH URL rewrite, release-esign.yml shared workspace).

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-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@caio-pizzol caio-pizzol merged commit 5a46ee2 into main May 16, 2026
74 checks passed
@caio-pizzol caio-pizzol deleted the caio/suppress-prerelease-comments branch May 16, 2026 11:40
@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 19, 2026

🎉 This PR is included in superdoc-sdk v1.10.0

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 19, 2026

🎉 This PR is included in @superdoc-dev/mcp v0.6.0

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 19, 2026

🎉 This PR is included in superdoc v1.34.0

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 19, 2026

🎉 This PR is included in @superdoc-dev/react v1.5.0

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 19, 2026

🎉 This PR is included in vscode-ext v2.6.0

superdoc-bot Bot pushed a commit that referenced this pull request May 19, 2026
### Changes

- Merge remote-tracking branch 'origin/main' into merge/main-into-stable-2026-05-19

### Chores

- merge stable into main
- merge stable into main (#3205)

### CI

- suppress per-PR success comments on prereleases (#3337)

### Bug Fixes

- toolbar serialization for stable rendering (#3248)
@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 19, 2026

🎉 This PR is included in template-builder v1.11.1

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 19, 2026

🎉 This PR is included in esign v2.7.1

The release is available on GitHub release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants