From 23acaab8f7b8a409e970248826f7a926a9c9e2c7 Mon Sep 17 00:00:00 2001 From: Dmitry Prudnikov Date: Sun, 27 Sep 2026 20:48:54 +0300 Subject: [PATCH] chore(release): keep the release PR body to the release - The breaking-changes section of the release PR pasted the raw cargo-semver-checks report: every lint's description and reference links, and the temporary checkout paths of the old version. A `pr_body` template keeps release-plz's layout and lists each failed lint with the items it names. The check stays on, since it also bumps the major version for a breaking change no commit declared. - The changelog listed the commit that moved the binary into a structured-proxy-cli package; that package was never released, as the binary moved back into structured-proxy before 5.0.0. A commit parser skips it by sha, ahead of release-plz's default parsers, which setting the key replaces. Closes #115 --- release-plz.toml | 63 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/release-plz.toml b/release-plz.toml index 2162bf7..7822b35 100644 --- a/release-plz.toml +++ b/release-plz.toml @@ -1,3 +1,66 @@ +[workspace] +# The release PR body: release-plz's default layout, except that the +# cargo-semver-checks report is cut down to each failed lint and the items it +# names. The raw report repeats every lint's description and reference links +# and names the temporary checkout the old version was unpacked into. The +# check itself stays on: it also bumps the major version for a breaking +# change no commit declared. +pr_body = ''' +{% set changes %} +{%- for release in releases %} +{%- if release.changelog %}{% if releases | length > 1 %} +## `{{ release.package }}` +{% endif %} +
+ +{% if release.title %}## {{ release.title }} +{% endif %} +{{ release.changelog }} +
{% endif %} +{% endfor %} +{% endset %} + +## 🤖 New release +{% for release in releases %} +* `{{ release.package }}`: {% if release.previous_version and release.previous_version != release.next_version %}{{ release.previous_version }} -> {% endif %}{{ release.next_version }}{% if release.semver_check == "incompatible" %} (⚠ API breaking changes){% elif release.semver_check == "compatible" %} (✓ API compatible changes){% endif %} +{%- endfor %} +{%- for release in releases %}{% if release.breaking_changes %} + +### ⚠ `{{ release.package }}` breaking changes + +cargo-semver-checks against {{ release.previous_version }}: +{% for line in release.breaking_changes | split(pat=" +") %} +{%- if line is starting_with(pat="--- failure ") %} +- {{ line | replace(from="--- failure ", to="") | replace(from=" ---", to="") }} +{%- elif line is starting_with(pat=" ") and line is containing(pat=" in file ") %} + - `{{ line | split(pat=" in file ") | first | trim | replace(from=", previously", to="") }}` +{%- endif %} +{%- endfor %}{% endif %}{% endfor %} +{% if changes %} +
Changelog

+{{ changes }} +

+{% endif %} +--- +This PR was generated with [release-plz](https://github.com/release-plz/release-plz/).''' + +[changelog] +# Setting the parsers replaces release-plz's defaults, so they are repeated +# below the one addition. +commit_parsers = [ + # The structured-proxy-cli package this commit introduced was never + # released: the binary moved back into structured-proxy before the next + # release, so the entry would describe a change no user sees. + { sha = "90d746b1b3c879359776adaf4bbbac5b97bf1f38", skip = true }, + { message = "^feat", group = "added" }, + { message = "^changed", group = "changed" }, + { message = "^deprecated", group = "deprecated" }, + { message = "^fix", group = "fixed" }, + { message = "^security", group = "security" }, + { message = "^.*", group = "other" }, +] + [[package]] name = "structured-proxy" # Preserve the existing tag scheme (v1.0.0, v1.0.1, ...) instead of the