Skip to content

Commit 76265fc

Browse files
committed
chore: add debugging to bump
command
1 parent d4dfd33 commit 76265fc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

commitizen/bump.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from glob import iglob
77
from string import Template
88
from typing import cast
9+
from logging import getLogger
910

1011
from commitizen.defaults import MAJOR, MINOR, PATCH, bump_message, encoding
1112
from commitizen.exceptions import CurrentVersionNotFoundError
@@ -14,6 +15,7 @@
1415

1516
VERSION_TYPES = [None, PATCH, MINOR, MAJOR]
1617

18+
logger = getLogger("commitizen")
1719

1820
def find_increment(
1921
commits: list[GitCommit], regex: str, increments_map: dict | OrderedDict
@@ -38,7 +40,11 @@ def find_increment(
3840
new_increment = increments_map[match_pattern]
3941
break
4042

43+
if new_increment is None:
44+
logger.debug(f"no increment needed for '{found_keyword}' in '{message}'")
45+
4146
if VERSION_TYPES.index(increment) < VERSION_TYPES.index(new_increment):
47+
logger.debug(f"increment detected is '{new_increment}' due to '{found_keyword}' in '{message}'")
4248
increment = new_increment
4349

4450
if increment == MAJOR:

0 commit comments

Comments
 (0)