-
fix(release): stop breaking change changelog entry from swallowing trailing PR body (#36052)
发布于
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
afterBREAKING CHANGE:until it reached theCo-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 issuessection, theFixes #NNNNNreference, 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, theFixes #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.
extractBreakingChangeExplanationnow:- 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 (---), aCo-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 the192f6681commit 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 commit192f6681.
下载附件
- strips HTML comments (