Fix changelog template splitting multi-line entries into duplicate bullets (#69454)#69458
Merged
Conversation
…bullets The towncrier template at changelog/.template.jinja was splitting every multi-line fragment on `\n`, emitting a `- ` bullet per source line, and appending the issue link to each line. A fragment that wrapped at 72 columns came out as N broken bullets all tagged with the same [#NNNN] link. Render `text` once as a single bullet with `| indent(2)` so continuation lines are indented under the bullet, with the issue link appended once at the end. Fragments that include Markdown-style nested sub-bullets (` - foo`) continue to render correctly because the indentation is preserved verbatim. Also clean up the already-published broken entries in CHANGELOG.md, pkg/rpm/salt.spec, and pkg/debian/changelog (118 entries across the 3008.0rc1/rc2/rc3/rc4, 3008.0, 3008.1, and 3006.25 sections) by merging each broken multi-bullet run back into a single bullet with one link. Original sentence content is preserved verbatim; only the line breaks between the broken bullet fragments are stitched back together. Fixes saltstack#69454
3 tasks
dwoz
added a commit
that referenced
this pull request
Jun 17, 2026
Defensive backport from #69458 (3008.x). The 3006.x changelog template already rendered single-line correctly, but lacked the `| indent(2)` filter so wrapped multi-line fragments did not get their continuation lines indented under the bullet. Apply the same one-line template hardening from #69458 (`{{ text | indent(2) }}`) and copy the five regression tests so a future merge-forward or hand-edit cannot reintroduce the per-line bullet split bug reported in #69454. No CHANGELOG.md / pkg/rpm/salt.spec / pkg/debian/changelog cleanup is needed on 3006.x: the broken pattern was never released here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes the towncrier-based changelog generator, which has been splitting every multi-line
changelog fragment into one bullet per source line and appending the
[#NNNN]issue linkto every single bullet. The template is replaced with a single-bullet render that uses
Jinja's
indent(2)filter so wrapped fragments stay one bullet with the link appendedonce. Already-published broken entries in
CHANGELOG.md,pkg/rpm/salt.specandpkg/debian/changelogare also cleaned up.What issues does this PR fix or reference?
Fixes #69454
Previous Behavior
A fragment such as
changelog/69031.fixed.md, wrapped at ~72 columns, rendered inCHANGELOG.mdas:Eight bullets, each with the same duplicated
[#69031]link, sentences sheared in halfat the source line breaks. Repeated for every multi-line fragment in the
v3008.0/v3008.1release notes and acrosspkg/rpm/salt.specandpkg/debian/changelog.New Behavior
One top-level bullet, continuation lines indented under it (Markdown reads them as part
of the same list item), and the issue link appended exactly once at the end.
Fragments that intentionally include Markdown-style nested sub-bullets (
- item) areunaffected: their indentation is preserved verbatim and they continue to render as a
nested sub-list under the single top-level bullet.
Scope of the diff
changelog/.template.jinja— replace the per-line loop introduced in808241d3154dwith a single-bulletindent(2)render.tests/pytests/unit/changelog/test_template.py— new TDD-verified unittests covering single-line, multi-line wrapped, multi-fragment, and
nested-sub-bullet cases. The multi-line test fails on the unmodified
template (8 top-level bullets where 1 is expected) and passes with the
fix.
CHANGELOG.md,pkg/rpm/salt.spec,pkg/debian/changelog— 118already-published broken multi-bullet entries consolidated back into
single bullets. Original sentence content is preserved verbatim; only
the broken line breaks between adjacent same-link bullets are stitched
back together. Affected release sections:
3008.1,3008.0,3008.0rc4,3008.0rc3,3008.0rc2,3008.0rc1,3006.25.Merge requirements satisfied?
changelog/69454.fixed.md)tests/pytests/unit/changelog/test_template.py)Commits signed with GPG?
Yes