Skip to content

fix(changelog): end each release block with a trailing newline#510

Merged
p-targowicz merged 1 commit into
masterfrom
qa-1670-block-trailing-newline
Jul 16, 2026
Merged

fix(changelog): end each release block with a trailing newline#510
p-targowicz merged 1 commit into
masterfrom
qa-1670-block-trailing-newline

Conversation

@p-targowicz

@p-targowicz p-targowicz commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Fast-follow fix for the config that went live in #504, reported on NorthernTechHQ/nt-gui#833: in a regenerated CHANGELOG, a release whose commits carry no tickets rendered its last bullet and the next release's ## header merged onto the same line (- Adjusted email endpoint## @northern.tech/store-0.41.0 - 2026-07-13).

Root cause: git-cliff concatenates per-release body renders directly, and trim = true strips the template's own trailing newline — so a block only ended with a newline when the all-tickets appendix happened to render (its table rows carry one). Ticketless releases ended bare on the last bullet.

Fix: emit a trim-proof trailing newline ({% raw %}) at the end of the body template in both cliff.toml and cliff.toml.scoped, so every release block separates regardless of content.

Reproduced the nt-gui case locally (three-tag repo, middle release ticketless) — merged line before, clean separation after. Full 24-commit fixture suite passes for both configs.

Ticket: QA-1670

A release whose last rendered element is a commit bullet (no tickets, so no appendix) ended without a newline, and the next release header got merged onto the bullet line. Emit a trim-proof trailing newline at the end of the body template so consecutive release blocks always separate.

Ticket: QA-1670
Signed-off-by: Patryk Targowicz <patryk.targowicz@northern.tech>
@p-targowicz

Copy link
Copy Markdown
Contributor Author

this is issue that @mineralsfree discovered

@mineralsfree mineralsfree left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good to me 🙈

@p-targowicz
p-targowicz merged commit 6ab3505 into master Jul 16, 2026
1 check passed
@p-targowicz
p-targowicz deleted the qa-1670-block-trailing-newline branch July 16, 2026 09:40
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