ci: strip leading whitespace from commit subjects before conventional parsing - #1835
Merged
Merged
Conversation
… parsing A squashed PR title with a stray leading space fails conventional-commit parsing, and filter_unconventional drops the commit from both the changelog and the version-bump calculation. The breaking change in #1801 was silently excluded this way, so the release PR computed v1.1.0 instead of v2.0.0. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Build Artifacts🪟 Windows
From workflow run 🐧 Linux
From workflow run |
volsa
approved these changes
Jul 29, 2026
Angus-Bethke-Bachmann
approved these changes
Jul 29, 2026
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.
Problem
The release automation proposed v1.1.0 (#1783) even though a breaking change (#1801,
feat!:) landed on master since v1.0.0.The squash commit subject of #1801 is literally
feat!: changed time to unsigned 32-bit preserving ltime as 64-bit (#1801)— the PR title carried a leading space. A subject that doesn't start with the type fails conventional-commit parsing, and withfilter_unconventional = truegit-cliff drops the commit entirely: it neither counts toward the version bump nor appears in the generatedCHANGELOG.md.protect_breaking_commitscan't help because the commit is never recognized as breaking in the first place.Fix
Add a
commit_preprocessorsentry that strips leading whitespace from the message before parsing.Verification
On current master with this change,
git-cliff --bumped-versionreportsv2.0.0(previouslyv1.1.0), andgit-cliff --unreleasedagain lists "Changed time to unsigned 32-bit preserving ltime as 64-bit (#1801)". Isolated behavior confirmed in a scratch repo:fix:only → v1.0.1; adding" feat!:"(leading space) → still v1.0.1; same subject without the space → v2.0.0.Once this lands, the next master push regenerates the release PR as v2.0.0 with the breaking change restored in the changelog.
🤖 Generated with Claude Code