git-cliff
git-cliff copied to clipboard
Patch version is bumped on breaking change if scope contains space
Is there an existing issue for this?
- [x] I have searched the existing issues
Description of the bug
If the scope mentioned in a commit message contains a space, and this commit mentions a breaking change, git-cliff bumps the patch version instead of the major version.
The space in the scope with the breaking flag are properly rendered in the changelog.
Steps To Reproduce
- Create an initial tag 1.0.0 on a Git repo
$ git tag 1.0.0
- Create a commit with a breaking change and a space in the commit message scope :
$ git commit --allow-empty -m 'feat(my scope)!: this is a test commit'
NB : The BREAKING CHANGE commit footer leads to the same behavior
- Invoke git-cliff to get next bumped version :
$ git-cliff --bumped-version
1.0.1
Expected behavior
The major version is bumped (version 2.0.0 is returned by git-cliff --bumped-version)
Screenshots / Logs
No response
Software information
- Operating system: Ubuntu 24.04 amd64
- Rust version: N/A (installed from GitHub release artifact
git-cliff-2.7.0-x86_64-unknown-linux-gnu.tar.gz) - Project version: 2.7.0
Same behavior with the latest OCI image from docker.io/orhunp/git-cliff.
Additional context
No response
Thanks for opening your first issue at git-cliff! Be sure to follow the issue template! ⛰️
Thanks for reporting! I'm able to reproduce, reported to upstream library: https://github.com/release-plz/release-plz/issues/1996
Thanks @orhun 😺
NB : I also reproduced the bug with a minor non-breaking change, only the patch version is bumped.