-
-
Notifications
You must be signed in to change notification settings - Fork 297
-
Hello 👋
The conventional commit message format allows for different ways of specifying breaking changes:
- BREAKING CHANGE: a commit that has a footer BREAKING CHANGE:, or appends a ! after the type/scope, introduces a breaking API change (correlating with MAJOR in Semantic Versioning). A BREAKING CHANGE can be part of commits of any type.
However, I can't figure out how to use this in cz bump
. It looks like I can use only the type
to drive the version number changes. Example pyproject.toml
config:
[tool.commitizen] name = "cz_custom" tag_format = "$version" version_scheme = "semver2" version_provider = "poetry" update_changelog_on_bump = true [tool.commitizen.custom] message_template = "{{change_type}}{% if scope %}({{scope}})){% endif %}{% if breaking %}!{% endif %}: {{description}}{% if body %}\n\n{{body}}{% endif %}" schema_pattern = "(feat|fix|build|chore|ci|docs|style|refactor|perf|test)(\\([^:]+\\))?(!)?:(\\s.*)" bump_pattern = "^(feat|fix|style|refactor|perf)(:?\\([^:]+\\))?(!)?" bump_map = {"!" = "MAJOR", "feat" = "MINOR", "fix" = "PATCH", "style" = "PATCH", "refactor" = "PATCH", "perf" = "PATCH"}
As far as I can tell, bump_map
read only the first match. So even if I specify feat!
, it doesn't pick it up. The same goes for the BREAKING CHANGE
footer.
Is this way of specifying breaking changes even supported or would I have to diverge from the standard and use a breaking
kind of type instead?
I read through the entire documentation, searched existing issues and discussions and was not able to find any answers.
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment
-
Having the same issue, couldn't find out how to configure it to firstly look if commit message doesn't contain !
after type specification.
Beta Was this translation helpful? Give feedback.