Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion commitizen/commands/bump.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,14 @@ def __call__(self) -> None:
changelog_file_name = None
dry_run = self.arguments["dry_run"]
if self.changelog_flag:
incremental_setting = self.config.settings.get("changelog_incremental")
changelog_args = {
"unreleased_version": new_tag_version,
"template": self.template,
"extras": self.extras,
"incremental": True,
"incremental": incremental_setting
if incremental_setting is not None
else True,
Comment on lines +318 to +320
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably also works and is less confusing

Suggested change
"incremental": incremental_setting
if incremental_setting is not None
else True,
"incremental": self.config.settings.get("changelog_incremental", True),

"dry_run": dry_run,
# governs logic for merge_prerelease
"during_version_bump": self.arguments["prerelease"] is None,
Expand Down
4 changes: 2 additions & 2 deletions commitizen/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Settings(TypedDict, total=False):
change_type_map: dict[str, str]
changelog_file: str
changelog_format: str | None
changelog_incremental: bool
changelog_incremental: bool | None
changelog_merge_prerelease: bool
changelog_start_rev: str | None
customize: CzSettings
Expand Down Expand Up @@ -100,7 +100,7 @@ class Settings(TypedDict, total=False):
],
"changelog_file": "CHANGELOG.md",
"changelog_format": None, # default guessed from changelog_file
"changelog_incremental": False,
"changelog_incremental": None,
"changelog_start_rev": None,
"changelog_merge_prerelease": False,
"update_changelog_on_bump": False,
Expand Down
4 changes: 2 additions & 2 deletions tests/test_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"style": [["pointer", "reverse"], ["question", "underline"]],
"changelog_file": "CHANGELOG.md",
"changelog_format": None,
"changelog_incremental": False,
"changelog_incremental": None,
"changelog_start_rev": None,
"changelog_merge_prerelease": False,
"update_changelog_on_bump": False,
Expand Down Expand Up @@ -137,7 +137,7 @@
"style": [["pointer", "reverse"], ["question", "underline"]],
"changelog_file": "CHANGELOG.md",
"changelog_format": None,
"changelog_incremental": False,
"changelog_incremental": None,
"changelog_start_rev": None,
"changelog_merge_prerelease": False,
"update_changelog_on_bump": False,
Expand Down