Skip to content

Deduplicate leading verbs in auto-generated changelog entries#35

Draft
Copilot wants to merge 2 commits into
masterfrom
copilot/fix-duplicated-verbs-changelog
Draft

Deduplicate leading verbs in auto-generated changelog entries#35
Copilot wants to merge 2 commits into
masterfrom
copilot/fix-duplicated-verbs-changelog

Conversation

Copilot AI commented Jun 22, 2026

Copy link
Copy Markdown

Auto changelog generation was duplicating action words when PR titles already started with a verb (for example, feat: added... rendering as Added added...). This change normalizes entry titles so the changelog prefix and title body do not repeat the same verb.

  • What changed

    • Added a prefix-aware verb normalization map in update-changelog.mjs to detect leading forms like add/added/adding, fix/fixed/fixing, revert/reverted, etc.
    • Introduced removeLeadingDuplicateVerb(prefix, title) and applied it during entry construction in buildEntry(...).
    • Kept existing section/prefix resolution behavior (TYPE_TO_SECTION, TYPE_TO_PREFIX) and only adjusted title text generation.
  • Behavioral impact

    • feat: added support for X- Added support for X ...
    • feat: add support for X- Added support for X ...
    • fix: fixed race condition- Fixed race condition ...
  • Example

    const prefix = TYPE_TO_PREFIX[type] ?? section;
    const dedupedTitle = removeLeadingDuplicateVerb(prefix, cleanedTitle);
    return `- ${prefix} ${dedupedTitle} ([#${prNumber}](${prUrl})) by @${prAuthor}`;

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