Skip to content

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

Closed

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

  1. bearomorphism commented on Dec 6, 2025

    @bearomorphism
    Collaborator

    I can provide a PR over the weekend.

    Sounds good! Thanks for locating the issue!

  2. bearomorphism commented on Dec 6, 2025

    @bearomorphism
    Collaborator

    We are also planning to redesign how commitizen pass options iirc

    The code you located is really error prone when we are adding new options

  3. zimmermannJakob commented on Dec 7, 2025

    @zimmermannJakob
    ContributorAuthor

    We are also planning to redesign how commitizen pass options iirc

    Sounds good! Unfortunately, my initial diagnosis was incorrect, as the argument is correctly passed. I opened a Draft PR, where the issue is fixed to the best of my ability.

    Before manual testing and polishing the PR, I ask that someone with a deeper understanding of the codebase takes a look and provides feedback. I will be happy to incorporate it.

  4. bearomorphism commented on Dec 7, 2025

    @bearomorphism
    Collaborator

    Haven't looked into the issue. I would suggest you to run a debugger if you're not sure what goes wrong

  5. zimmermannJakob commented on Jan 13, 2026

    @zimmermannJakob
    ContributorAuthor

    Fixed in 4.11.3 through #1700
    Thank you all for your help!

  6. bearomorphism commented on Jan 14, 2026

    @bearomorphism
    Collaborator

    Thanks!

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