Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 0d12b80

Browse files
Jan Willhausjanw
Jan Willhaus
authored andcommitted
feat(commands/bump): add config option to create changelog on bump
1 parent 1ca22f4 commit 0d12b80

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

commitizen/commands/bump.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ def __init__(self, config: BaseConfig, arguments: dict):
3737
},
3838
}
3939
self.cz = factory.commiter_factory(self.config)
40-
self.changelog = arguments["changelog"]
40+
self.changelog = arguments["changelog"] or self.config.settings.get(
41+
"update_changelog_on_bump"
42+
)
4143
self.no_verify = arguments["no_verify"]
4244
self.check_consistency = arguments["check_consistency"]
4345

commitizen/defaults.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"changelog_file": "CHANGELOG.md",
1414
"changelog_incremental": False,
1515
"changelog_start_rev": None,
16+
"update_changelog_on_bump": False,
1617
}
1718

1819
MAJOR = "MAJOR"

0 commit comments

Comments
 (0)