Description
The config "changelog_merge_prerelease" is ignored when the changelog is modified through cz bump (--changelog).
I think I located the issue at
|
args = { |
|
"unreleased_version": new_tag_version, |
|
"template": self.template, |
|
"extras": self.extras, |
|
"incremental": True, |
|
"dry_run": dry_run, |
|
} |
, where the args do not contain changelog command specific arguments. I can provide a PR over the weekend.
Steps to reproduce
- Create a test git repo
git init
- Create a .cz.toml config with the following content:
[tool.commitizen]
name = "cz_conventional_commits"
tag_format = "$version"
version_scheme = "semver2"
version = "0.1.0"
update_changelog_on_bump = true
changelog_merge_prerelease = true
- git add . && cz commit
- Create a prerelease with
cz bump --prerelease rc
- Create the final release with
cz bump or cz bump --changelog
Current behavior
In step 4. the prerelease entry is created as expected, but it is not merged in step 5:
Resulting changelog:
## 0.1.1 (2025-12-05)
## 0.1.1-rc.0 (2025-12-05)
Desired behavior
The release candidate is merged with the actual release:
## 0.1.1 (2025-12-05)
### Fix
...
The desired behavior may be observed by performing cz changelog.
Screenshots
No response
Environment
Commitizen Version: 4.10.0
Python Version: 3.14.1 (main, Dec 2 2025, 12:51:37) [Clang 17.0.0 (clang-1700.4.4.1)]
Operating System: Darwin
Description
The config "changelog_merge_prerelease" is ignored when the changelog is modified through cz bump (--changelog).
I think I located the issue at
commitizen/commitizen/commands/bump.py
Lines 308 to 314 in 9f3ec86
Steps to reproduce
git initcz bump --prerelease rccz bumporcz bump --changelogCurrent behavior
In step 4. the prerelease entry is created as expected, but it is not merged in step 5:
Resulting changelog:
Desired behavior
The release candidate is merged with the actual release:
The desired behavior may be observed by performing
cz changelog.Screenshots
No response
Environment
Commitizen Version: 4.10.0
Python Version: 3.14.1 (main, Dec 2 2025, 12:51:37) [Clang 17.0.0 (clang-1700.4.4.1)]
Operating System: Darwin