Skip to content

fix(changelog): disable @-mention pings in publish issues for calver releases#755

Merged
BYK merged 1 commit intomasterfrom
fix/calver-disable-publish-issue-mentions
Feb 17, 2026
Merged

fix(changelog): disable @-mention pings in publish issues for calver releases#755
BYK merged 1 commit intomasterfrom
fix/calver-disable-publish-issue-mentions

Conversation

@BYK
Copy link
Member

@BYK BYK commented Feb 17, 2026

Summary

For CalVer projects, the publish issue changelog now uses bold author names (**author**) instead of @author to avoid pinging many contributors on every regular-cadence release. The committed CHANGELOG.md is unaffected and keeps clickable @-mentions.

Changes

  • src/utils/helpers.ts — New disableChangelogMentions() helper that replaces by @author in with by **author** in via regex, targeting the exact output format of formatChangelogEntry()
  • src/commands/prepare.ts — Before writing the changelog to GitHub Actions outputs (which feed the publish issue body), detects CalVer via two paths:
    • argv.newVersion === 'calver' (CLI: craft prepare calver)
    • getVersioningPolicy() === VersioningPolicy.CalVer (config: versioning.policy: calver)
  • src/utils/__tests__/helpers.test.ts — 7 tests for the regex helper

Why regex replacement instead of re-generating the changelog?

The same changelogBody feeds both CHANGELOG.md (written earlier, wants @-mentions for clickable links) and the Actions file output (wants bold mentions to avoid pings). Re-generating would require duplicating expensive GitHub API calls or refactoring the memoization layer. A targeted regex on the well-defined formatChangelogEntry() output is simpler and equally reliable.

…releases

For CalVer projects the publish issue changelog now uses bold author
names (`**author**`) instead of `@author` to avoid pinging many
contributors on every regular-cadence release.  The committed
CHANGELOG.md is unaffected and keeps clickable @-mentions.

CalVer is detected from either the CLI argument (`craft prepare calver`)
or the config (`versioning.policy: calver`).
@BYK BYK marked this pull request as ready for review February 17, 2026 20:51
@BYK BYK requested a review from hubertdeng123 February 17, 2026 20:53
@BYK BYK enabled auto-merge (squash) February 17, 2026 20:58
* `- Title by @author in [#123](url)`
*/
export function disableChangelogMentions(changelog: string): string {
return changelog.replace(/ by @(\S+) in /g, ' by **$1** in ');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a bit brittle, but don't really see another great way to do this

@BYK BYK merged commit 1afb9c3 into master Feb 17, 2026
17 checks passed
@BYK BYK deleted the fix/calver-disable-publish-issue-mentions branch February 17, 2026 21:05
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.

2 participants