Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 661a140

Browse files
committed
fix(commands/bump): prevent using incremental changelog when it is set to false in config
1 parent fc54b51 commit 661a140

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

‎commitizen/commands/bump.py‎

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,11 @@ def __call__(self) -> None: # noqa: C901
293293
"unreleased_version": new_tag_version,
294294
"template": self.template,
295295
"extras": self.extras,
296-
"incremental": True,
296+
"incremental": (
297+
True
298+
if not self.config.is_customized
299+
else self.config.settings.get("changelog_incremental")
300+
),
297301
"dry_run": True,
298302
},
299303
)
@@ -305,7 +309,14 @@ def __call__(self) -> None: # noqa: C901
305309
self.config,
306310
{
307311
"unreleased_version": new_tag_version,
308-
"incremental": True,
312+
"incremental": self.config.settings.get(
313+
"changelog_incremental",
314+
(
315+
True
316+
if not self.config.is_customized
317+
else self.config.settings.get("changelog_incremental")
318+
),
319+
),
309320
"dry_run": dry_run,
310321
"template": self.template,
311322
"extras": self.extras,

‎commitizen/config/base_config.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ def settings(self) -> Settings:
1919
def path(self) -> Path | None:
2020
return self._path
2121

22+
@property
23+
def is_customized(self) -> bool:
24+
return type(self) is not BaseConfig
25+
2226
def set_key(self, key, value):
2327
"""Set or update a key in the conf.
2428

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /