Skip to content

fix(git-cliff-release): keep unreleased markers in the changelog and normalize spacing around them - #38

Draft
vdusek wants to merge 1 commit into
mainfrom
fix/changelog-unreleased-format
Draft

vdusek wants to merge 1 commit into
mainfrom
fix/changelog-unreleased-format

Conversation

@vdusek

@vdusek vdusek commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Changes the generated changelog so the unreleased markers are always present and surrounded by consistent blank lines:

<!-- git-cliff-unreleased-start -->

## 1.9.3 - **not yet released**

### 🐛 Bug Fixes

- Some entry ...

<!-- git-cliff-unreleased-end -->

## [1.9.2](.../releases/tag/v1.9.2) (2026-08-17)

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

@vdusek vdusek added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels Aug 18, 2026
@vdusek vdusek self-assigned this Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants