发布

  • fix(release): stop breaking change changelog entry from swallowing trailing PR body (#36052)

    frostbyte_neo 发布于 2026-06-19 16:16:05 +00:00

    Current Behavior

    When a commit contains a BREAKING CHANGE: footer followed by
    additional PR-body content (common with squash-merged PR descriptions),
    the changelog's "⚠️ Breaking Changes" section captured everything
    after BREAKING CHANGE: until it reached the Co-authored-by: /
    git-metadata block at the very bottom of the commit. As a result, the
    breaking-change entry swallowed unrelated content such as the ## Related issues section, the Fixes #NNNNN reference, and <!-- ... --> HTML comment markers (e.g. polygraph session blocks).

    For example, commit
    192f6681
    (feat(angular): support angular v22) rendered its breaking change as
    the note plus the Related Issues heading, the Fixes #35910
    reference, and the entire polygraph session comment block.

    Expected Behavior

    The breaking-change entry contains only the breaking-change note itself.
    For the example above it now renders just:

    Angular v19 is no longer supported.

    extractBreakingChangeExplanation now:

    • strips HTML comments (<!-- ... -->, including multi-line)
      wherever they appear, so a comment in the middle of a note no longer
      truncates the text around it; and
    • scans line-by-line from the BREAKING CHANGE: line and stops at
      the first structural boundary: a Markdown heading (e.g. ## Related issues), a horizontal rule / separator (---), a Co-authored-by:
      trailer, or the git-metadata " delimiter.

    Multi-line and multi-paragraph breaking changes remain fully supported
    (preserving the behavior from #33070). Two regression tests were added —
    one reproducing the 192f6681 commit body, and one proving HTML
    comments are stripped rather than used to truncate — and all 18
    changelog-renderer tests pass.

    Related Issue(s)

    No tracked issue — reported via internal review of the changelog output
    for commit 192f6681.


    View session information

    下载附件