Skip to content

Commit 49c7e2d

Browse files
committed
fix: align naming convension
1 parent b753dd5 commit 49c7e2d

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

commitizen/bump.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def find_increment(
2626
commits: list[GitCommit],
2727
regex: str,
2828
increments_map: dict | OrderedDict,
29-
ignore_bump_sha_list: list[str] | None = None,
29+
ignore_bump_rev_list: list[str] | None = None,
3030
ignore_bump_author_list: list[str] | None = None,
3131
) -> Increment | None:
3232
if isinstance(increments_map, dict):
@@ -38,9 +38,9 @@ def find_increment(
3838
increment: str | None = None
3939

4040
for commit in commits:
41-
if ignore_bump_sha_list and commit.rev in ignore_bump_sha_list:
41+
if ignore_bump_rev_list and commit.rev in ignore_bump_rev_list:
4242
logger.debug(
43-
f"Skipping commit {commit.rev} as it's in ignore_bump_sha_list"
43+
f"Skipping commit {commit.rev} as it's in ignore_bump_rev_list"
4444
)
4545
continue
4646

commitizen/commands/bump.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def __init__(self, config: BaseConfig, arguments: BumpArgs) -> None:
104104
self.retry = arguments["retry"]
105105
self.pre_bump_hooks = self.config.settings["pre_bump_hooks"]
106106
self.post_bump_hooks = self.config.settings["post_bump_hooks"]
107-
self.ignore_bump_sha_list = self.config.settings.get("ignore_bump_sha_list")
107+
self.ignore_bump_rev_list = self.config.settings.get("ignore_bump_rev_list")
108108
self.ignore_bump_author_list = self.config.settings.get(
109109
"ignore_bump_author_list"
110110
)
@@ -166,7 +166,7 @@ def _find_increment(self, commits: list[git.GitCommit]) -> Increment | None:
166166
commits,
167167
regex=bump_pattern,
168168
increments_map=bump_map,
169-
ignore_bump_sha_list=self.ignore_bump_sha_list,
169+
ignore_bump_rev_list=self.ignore_bump_rev_list,
170170
ignore_bump_author_list=self.ignore_bump_author_list,
171171
)
172172

commitizen/defaults.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class Settings(TypedDict, total=False):
6565
version_type: str | None
6666
version: str | None
6767
breaking_change_exclamation_in_title: bool
68-
ignore_bump_sha_list: list[str] | None
68+
ignore_bump_rev_list: list[str] | None
6969
ignore_bump_author_list: list[str] | None
7070

7171

tests/test_bump_find_increment.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,10 @@ def test_find_increment(messages, expected_type):
108108
assert increment_type == expected_type
109109

110110

111-
def test_find_increment_with_ignored_sha():
111+
def test_find_increment_with_ignored_rev():
112112
messages = [
113113
"docs(README): motivation",
114-
"BREAKING CHANGE: your upstream dependency have some breaking changes",
114+
"feat: this should not be bumped because of the ignore_bump_rev_list",
115115
]
116116
commits = [
117117
GitCommit(rev="test1", title=messages[0]),
@@ -121,14 +121,14 @@ def test_find_increment_with_ignored_sha():
121121
commits,
122122
regex=ConventionalCommitsCz.bump_pattern,
123123
increments_map=ConventionalCommitsCz.bump_map,
124-
ignore_bump_sha_list=["test2"],
124+
ignore_bump_rev_list=["test2"],
125125
)
126126
assert increment_type is None
127127

128128

129129
def test_find_increment_with_ignored_author():
130130
messages = [
131-
"BREAKING CHANGE: your upstream dependency have some breaking changes",
131+
"feat: this should not be bumped because of the ignore_bump_author_list",
132132
"docs(README): motivation",
133133
]
134134
commits = [

0 commit comments

Comments
 (0)