Description
Goal
make regular expression pattern stricter so that we won't accidentally match things we don't need
Description
In commitizen/cz/conventional_commits/conventional_commits.py#L33 on command-changelog
branch, I use named capture group so that we could use a stricter regular expression like .*\n\nBREAKING CHANGE
. The benefit of it is that we don't have to break the whole commit message into lines like commitizem/bump.py#L31. It can also avoid bump or generate changelog based on commit message like fix --- it does not follow the rule but still match the pattern
.
Another thought on this topic is that we probably merge the bump_map
and bump_pattern
into one some data class to store name
(e.g., break
), pattern
(e.g., .*\n\nBREAKING CHANGE
), behavior
(e.g., PATCH
).