-
-
Notifications
You must be signed in to change notification settings - Fork 301
Description
Type
- Content inaccurate
URL
https://commitizen-tools.github.io/commitizen/bump/
Description
Problem
The docs state "fix+everything else" bumps PATCH of the version string per the default commit_map.
However, this is not the case:
commitizen/commitizen/defaults.py
Lines 78 to 80 in 7916511
| (r"^fix", PATCH), | |
| (r"^refactor", PATCH), | |
| (r"^perf", PATCH), |
Only fix, refactor, and perf bump PATCH, leaving out docs, style, test, build, and ci, which don't bump any part of the version.
Not only are the docs incorrect, but this is out of step with Conventional Commits 1.0.0. Additional commit types are permitted by the specification (e.g. commitizen appears to be using the Angular Convention by default), but no guidance on version bumping is given for these addition types. Where a commit type bumps or does not bump a version, this should be explicitly stated (e.g. the commit message instructions for fix has Correlates with PATCH in SemVer, but not refactor or perf, leaving one to believe these do nothing).
Recommendations:
-
(PREFERRED; Conventional Commit spec): Only
featureandfixshould be in the defaultcommit_mapper Conventional Commits 1.0.0.refactorandperfshould not bumpPATCH. The Angular typesrefactor,perf,docs,style,test,build, andcishould be removed from the default commit types. -
(ALTERNATIVE; Angular Convention, but with explicit messaging):
refactorandperfshould not bumpPATCH. The commit message instructions forrefactor,perf,docs,style,test,build, andcishould addCorrelates with no version bump in SemVer. In addition, the docs should clearly state the Angular Convention commit types are included incz cby default.
Tasks:
- Correct the documentation (state what change types bump versions and that commitizen includes Angular Convention types by default)
- Add notes in commit message instructions to identify what version bump occurs with all change types (e.g. Correlates with no version bump in SemVer)
