Skip to content

The config "changelog_merge_prerelease" is ignored when the changelog is modified through cz bump (--changelog) #1694

Description

@zimmermannJakob

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

  1. Create a test git repo git init
  2. 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
  1. git add . && cz commit
  2. Create a prerelease with cz bump --prerelease rc
  3. 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions