-
-
Notifications
You must be signed in to change notification settings - Fork 321
fix(bump): preserve existing changelog header when changelog_merge_prerelease is used with cz bump --changelog
#1850
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
bearomorphism
merged 8 commits into
commitizen-tools:master
from
edgarrmondragon:fix/bump-changelog-merge-pre-removes-header
Feb 7, 2026
+129
−14
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
0c430ae
test: Add a failing test
edgarrmondragon 681a433
fix(bump): Preserve existing changelog header when `changelog_merge_p…
edgarrmondragon 778edcb
fix(bump): Preserve existing changelog header when `changelog_merge_p…
edgarrmondragon fb214be
Merge branch 'master' into fix/bump-changelog-merge-pre-removes-header
edgarrmondragon 397abe7
test: Remove redundant assertions
edgarrmondragon fbee607
refactor: Inline condition and rely on comments to explain the logic
edgarrmondragon 85b1f90
test: Remove another redundant assertion
edgarrmondragon b9ed2c9
test: Use a single parametrized test
edgarrmondragon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...st_bump_command/test_changelog_merge_preserves_header_with_prerelease_merge_.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # Changelog | ||
|
|
||
| All notable changes to this project will be documented here. | ||
|
|
||
| ## 0.2.0 (2025-01-01) | ||
|
|
||
| ### Feat | ||
|
|
||
| - new feature right before the bump | ||
| - add new output | ||
|
|
||
| ### Fix | ||
|
|
||
| - output glitch | ||
|
|
||
| ## 0.1.0 (1970-01-01) |
21 changes: 21 additions & 0 deletions
21
...bump_command/test_changelog_merge_preserves_header_with_prerelease_no_merge_.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # Changelog | ||
|
|
||
| All notable changes to this project will be documented here. | ||
|
|
||
| ## 0.2.0 (2025-01-01) | ||
|
|
||
| ### Feat | ||
|
|
||
| - new feature right before the bump | ||
|
|
||
| ## 0.2.0a0 (2025-01-01) | ||
|
|
||
| ### Feat | ||
|
|
||
| - add new output | ||
|
|
||
| ### Fix | ||
|
|
||
| - output glitch | ||
|
|
||
| ## 0.1.0 (1970-01-01) |
16 changes: 16 additions & 0 deletions
16
.../test_bump_command/test_changelog_merge_preserves_header_without_prerelease_.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # Changelog | ||
|
|
||
| All notable changes to this project will be documented here. | ||
|
|
||
| ## 0.2.0 (2025-01-01) | ||
|
|
||
| ### Feat | ||
|
|
||
| - new feature right before the bump | ||
| - add new output | ||
|
|
||
| ### Fix | ||
|
|
||
| - output glitch | ||
|
|
||
| ## 0.1.0 (1970-01-01) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The existing deprecation test for
--files-only(test_bump_deprecate_files_only) was removed in this hunk and doesn’t appear elsewhere in the test suite. This drops coverage for the expectedDeprecationWarning+ExpectedExitbehavior; please restore the test (or add an equivalent) alongside the new changelog header regression tests.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My fault I didn't see this section...
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, sorry about that!
I saw the drop in coverage for
--files-onlybut didn't think more of that 🤦