Skip to content

Commit

Permalink
fix(bump): add debugging to bump
Browse files Browse the repository at this point in the history
command
  • Loading branch information
carlossg committed Feb 7, 2025
1 parent d4dfd33 commit 80bbdb2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions commitizen/bump.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import re
from collections import OrderedDict
from glob import iglob
from logging import getLogger
from string import Template
from typing import cast

Expand All @@ -14,6 +15,8 @@

VERSION_TYPES = [None, PATCH, MINOR, MAJOR]

logger = getLogger("commitizen")


def find_increment(
commits: list[GitCommit], regex: str, increments_map: dict | OrderedDict
Expand All @@ -38,7 +41,15 @@ def find_increment(
new_increment = increments_map[match_pattern]
break

if new_increment is None:
logger.debug(
f"no increment needed for '{found_keyword}' in '{message}'"
)

if VERSION_TYPES.index(increment) < VERSION_TYPES.index(new_increment):
logger.debug(
f"increment detected is '{new_increment}' due to '{found_keyword}' in '{message}'"
)
increment = new_increment

if increment == MAJOR:
Expand Down

0 comments on commit 80bbdb2

Please sign in to comment.