fix(git-cliff-release): keep unreleased markers in the changelog and normalize spacing around them - #38
Draft
vdusek wants to merge 1 commit into
Draft
fix(git-cliff-release): keep unreleased markers in the changelog and normalize spacing around them#38vdusek wants to merge 1 commit into
vdusek wants to merge 1 commit into
Conversation
…normalize spacing around them
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.
Changes the generated changelog so the unreleased markers are always present and surrounded by consistent blank lines:
Previously the heading followed the start marker directly, two blank lines preceded the end marker, no blank line followed it, and a stable release removed the markers entirely until the next prerelease.
cliff.toml: blank line after the start marker, exactly one blank line before the end marker, blank line after it; also fixes a stray newline in the linkless version-heading branch.action.yaml: the unreleased section is now removed together with the blank lines right after it, so the freshly rendered section fully controls the spacing (self-healing and idempotent); after a stable release an empty marker block is reinserted ahead of the first release section.New release sections are separated by one blank line (previously two); existing sections are never rewritten, so each repo gets a small one-time healing diff on its next release.
Verified by replaying the pipeline locally (git-cliff 2.10.x) across: bootstrap from the current format, repeated runs (byte-identical), multi-group sections, stable release, prerelease after stable, fresh full generation, a marker-less legacy changelog, and release-notes rendering (unchanged).
✍️ Drafted by Claude Code