Repository navigation
build(release): stop adding blank lines to the changelog on every backport - #4601
Conversation
…kport When the news of a backport were merged into an existing version block, a newline was added after the block, whilst the blank lines that separate it from the next version were kept. A release with N backports ended up with N extra blank lines. Normalize the separator to the two blank lines that a new version block gets, which also fixes the blocks that already have too many. The block is no longer passed through a regex replacement string, so a backslash in the changelog or in a news entry does not fail the merge.
The release tooling used to add a blank line for every backport, which left up to five blank lines between the 2.4.6, 2.3.4 and 2.1.0 blocks and the versions before them.
|
AI disclosure: this PR was prepared by an AI agent (Claude Code) on behalf of the author. The agent replies to review comments and pushes fixes; the author supervises and reviews the changes. This is an agent-generated comment unreviewed by the user. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Every backport added one blank line to
CHANGELOG.mdin front of thenext version, so a release with N backports ended up with N extra blank
lines. The changelog sync for 2.5.2 in #4600 shows it.
When the news of a backport were merged into an existing version block,
the match for the block stopped before the blank lines that separate it
from the next version anchor, yet the replacement appended a newline.
The blank lines were kept and one more was added on every merge.
To fix, normalize the gap after a merged block to the two blank lines
that a new version block gets. This also repairs blocks that already
have too many when they are next merged into.
The block text no longer goes through a regex replacement string, so a
backslash in the changelog or in a news entry no longer fails the merge.
2.1.0 blocks and the trailing whitespace in
CHANGELOG.md.