Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch version is bumped on breaking change if scope contains space #1008

Open
1 task done
lgatellier opened this issue Jan 16, 2025 · 3 comments
Open
1 task done

Patch version is bumped on breaking change if scope contains space #1008

lgatellier opened this issue Jan 16, 2025 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@lgatellier
Copy link

Is there an existing issue for this?

  • 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

  1. Create an initial tag 1.0.0 on a Git repo
$ git tag 1.0.0
  1. 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

  1. 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

Same behavior with the latest OCI image from docker.io/orhunp/git-cliff.

Additional context

No response

@lgatellier lgatellier added the bug Something isn't working label Jan 16, 2025
Copy link

welcome bot commented Jan 16, 2025

Thanks for opening your first issue at git-cliff! Be sure to follow the issue template! ⛰️

@orhun
Copy link
Owner

orhun commented Jan 18, 2025

Thanks for reporting! I'm able to reproduce, reported to upstream library: release-plz/release-plz#1996

@lgatellier
Copy link
Author

Thanks @orhun 😺

NB : I also reproduced the bug with a minor non-breaking change, only the patch version is bumped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants