-
-
Notifications
You must be signed in to change notification settings - Fork 268
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
build commit is not eligible to be bumped #781
Comments
I just traced the code a bit, and it seems to be the case from long ago 🤔 Not sure why it works that way on 3.5.2, but I'll take a look |
Hi!
|
I think this is misleading content in https://commitizen-tools.github.io/commitizen/bump/#:~:text=fix%20%2B%20everything%20else. Not everything should be bumped as a PATCH. e.g., doc is most likely not related to version. The source code is commitizen/commitizen/defaults.py Lines 108 to 117 in d19007e
@woile Please correct me if I'm wrong. In the meantime, I'll turn this into a documentation fix |
I think conventional commits only defines I think our conventional_commits_cz is outdated, we should come up with a I couldn't find anywhere what should happen with |
I am fine with |
@pdarulewski Could you please send here a snippet of your |
@DaDlugosch sure, here you go: [tool.commitizen]
version = "1.2.3"
version_files = [
"app/__init__.py:__version__",
"pyproject.toml:version",
]
name = "cz_customize"
[tool.commitizen.customize]
bump_pattern = '^(feat|fix|ci|build|perf|refactor|my_custom_one)'
bump_map = { feat = "MINOR", fix = "PATCH", ci = "PATCH", build = "PATCH", perf = "PATCH", refactor = "PATCH", 'my_custom_one' = "PATCH" }
schema_pattern = '^(build|ci|docs|feat|fix|perf|refactor|style|test|chore|revert|bump|my_custom_one)(\(\S+\))?\:?\s.*' To enable customised rules in the Docs are saying that it's only possible through |
I just upgraded to the latest version and it doesn't seem to work yet: This is my git log. I tried to run bump: version 1.7.0 → 1.7.1
refactor: test
bump: version 1.6.1 → 1.7.0
feat: test
build: test
ci: test
ci: test
chore: test
bump: version 1.6.0 → 1.6.1
refactor: test I tried this config in [commitizen.customize]
bump_pattern = '^(feat|fix|ci|build|perf|refactor|chore)'
bump_map = { feat = "MINOR", fix = "PATCH", ci = "PATCH", build = "PATCH", perf = "PATCH", refactor = "PATCH", chore = "PATCH" }
schema_pattern = '^(build|ci|docs|feat|fix|perf|refactor|style|test|chore|revert|bump)(\(\S+\))?\:?\s.*' In short: I'm on the latest version (3.27.0). |
Description
Hello,
Thanks for creating and maintaining this great library 🙏
I found out that
build:
commits don't qualify as eligible for bumping anymore. I couldn't find any information if this is an expected behaviour, so I guess it might be a potential bug. It seems that it was working in 3.2.1 since it was the version that I was using before updating to the latest one.Steps to reproduce
Although, if I select the
BREAKING CHANGE
, it's bumped.Current behavior
As you can see, I can't bump the version after committing a
build
change. I also noticed thatci
is not eligible either, so probably more of the commits type are influenced by this.Documentation says that everything other than a
BREAKING CHANGE
andfeat
should be bumped asPATCH
, here's the link.It works for breaking changes, so it seems it takes precedence over the commit types.
Desired behavior
I would argue that commits related to the build process, e.g. docker image version,
O
flags for the compiler, pip dependency updates, poetry.lock update, etc. should be bumped asPATCH
at least. These changes may not necessarily change the code behaviour but they certainly change the environment and the state of the codebase which may lead to unexpected results.I don't want to replace such commits with feats or fixes since the code itself is not changed.
If this is an expected behaviour, it would be good to reflect that in the documentation.
Screenshots
No response
Environment
EDIT:
ci
being influenced tooThe text was updated successfully, but these errors were encountered: