From 08ad737da1b56a0388f2691630e11ce325a9a543 Mon Sep 17 00:00:00 2001 From: Luis Markmann <110569833+lmarkmann@users.noreply.github.com> Date: Sat, 29 Aug 2026 13:30:34 +0200 Subject: [PATCH] chore: put breaking changes in the changelog they belong in commit_parsers groups on the type alone, so feat! lands under Added exactly like feat and the release notes never say what stopped compiling. 0.5.0 has a Breaking section because someone wrote it by hand; 0.6.0 was equally breaking and shipped without one, and 0.7.0 was about to do the same while removing a public enum variant, moving a public function, and marking a struct non_exhaustive. The template now renders a Breaking section from commit.breaking, which git-conventional sets for both the ! marker and a BREAKING CHANGE footer, so either spelling is caught. A commit appears in both places on purpose: Added for what it adds, Breaking for what it costs. Verified against 84f093f in a throwaway clone rather than trusted to CI, which is also how the second half of this turned up: breaking_description keeps only the first physical line of the trailer, so the wrapped one on that commit renders as a sentence cut off mid-clause. That constraint is now in rules/writing.md, since bodies here are otherwise wrapped at 80 and the trailer is the one line that must not be. --- release-plz.toml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/release-plz.toml b/release-plz.toml index 3d88342..6948b4a 100644 --- a/release-plz.toml +++ b/release-plz.toml @@ -39,8 +39,19 @@ header = """# Changelog All notable changes to celsius are recorded here. Format roughly follows Keep a Changelog and versions follow SemVer. """ +# The breaking block is listed first and separately, and it is not decoration. `commit_parsers` +# below groups on the type alone, so `feat!` lands under Added exactly like `feat` and the release +# notes never say what stopped compiling. 0.5.0 carries a Breaking section only because someone +# wrote it by hand; 0.6.0 was equally breaking and shipped without one. git-conventional sets +# `breaking` for both the `!` marker and a `BREAKING CHANGE:` footer, so this catches either, and +# a commit appears in both places on purpose: Added for what it adds, Breaking for what it costs. body = """ ## [{{ version }}] - {{ timestamp | date(format="%Y-%m-%d") }} +{% set breaking = commits | filter(attribute="breaking", value=true) %}{% if breaking | length > 0 %} +### Breaking +{% for commit in breaking %} +- {{ commit.breaking_description | default(value=commit.message) | upper_first }}{% endfor %} +{% endif %} {% for group, commits in commits | group_by(attribute="group") %} ### {{ group | upper_first }} {% for commit in commits %}