Skip to content

ci: remove redundant incremental changelog setting - #2088

Merged
woile merged 1 commit into
masterfrom
ci/remove-redundant-changelog-incremental
Sep 15, 2026
Merged

woile merged 1 commit into
masterfrom
ci/remove-redundant-changelog-incremental

Conversation

@bearomorphism

Copy link
Copy Markdown
Collaborator

Description

Remove the repository-wide changelog_incremental = true setting that caused the v4.18.1 release workflow to fail with:

--incremental cannot be combined with a rev_range

This supersedes #2086 with a smaller, repository-specific fix.

Root cause

#2074 enabled two settings to restore changelog updates during automated bumps:

update_changelog_on_bump = true
changelog_incremental = true

Only update_changelog_on_bump is needed. When that setting enables changelog generation, commitizen.commands.bump.Bump already invokes Changelog with incremental=True. Existing coverage in test_bump_changelog_contains_increment_only verifies that configuration updates only the new changelog section.

The additional global changelog_incremental = true also affected the later, independent release-note command:

cz changelog --dry-run "${NEW_VERSION}"

${NEW_VERSION} is the command's positional rev_range. Commitizen intentionally rejects combining a revision range with incremental generation, so the redundant global setting made this command fail. --dry-run itself is unrelated to the conflict, and the equivalent setup-cz example remains valid for projects that do not globally enable incremental changelogs.

Fix

Keep update_changelog_on_bump = true, preserving incremental changelog updates during cz bump, and remove only changelog_incremental = true. The existing workflow command can then generate notes for the exact release revision without changing Commitizen's public CLI.

Validation

  • uv run cz changelog --dry-run 4.18.1 generates the expected v4.18.1 section.
  • uv run pytest -q tests/commands/test_bump_command.py -k bump_changelog_contains_increment_only passes, confirming automated bump changelogs remain incremental.

Release recovery

The failed job had already pushed the v4.18.1 bump commit and tag before gh release create ran. This prevents the same conflict in future runs, but the missing v4.18.1 GitHub Release must be created separately from the existing tag.

Checklist

Was generative AI tooling used to co-author this PR?

  • Yes (GitHub Copilot)

Generated-by: GitHub Copilot following the guidelines

The bump command already forces incremental changelog generation when update_changelog_on_bump is enabled. Setting changelog_incremental globally also affects the separate release-note command, where the positional version is a rev_range and conflicts with incremental mode.

Keep update_changelog_on_bump enabled so automated bumps continue preserving changelog history, while allowing the existing exact-version dry-run to generate GitHub release notes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Commitizen bump preview

No commits in this PR are eligible for a version bump.

@woile
woile merged commit 100bfe3 into master Sep 15, 2026
19 checks passed
@woile
woile deleted the ci/remove-redundant-changelog-incremental branch September 15, 2026 07:08
@woile

woile commented Sep 15, 2026

Copy link
Copy Markdown
Member

Thanks!!

@bearomorphism

Copy link
Copy Markdown
Collaborator Author

np, I introduced the regression actually :(

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants