Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork321
feat(bump_rule): add BumpRule, VersionIncrement, Prerelease Enum#1518
feat(bump_rule): add BumpRule, VersionIncrement, Prerelease Enum#1518bearomorphism wants to merge 1 commit intocommitizen-tools:masterfrom
Conversation
bb305ad to8a6c84fComparecodecovbot commentedJun 9, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@## master #1518 +/- ##==========================================+ Coverage 97.33% 98.71% +1.37%========================================== Files 42 61 +19 Lines 2104 2722 +618 ==========================================+ Hits 2048 2687 +639+ Misses 56 35 -21
Flags with carried forward coverage won't be shown.Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
8a6c84f to8dd8d42Compare
Lee-W left a comment
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.
This is definitely a great pull request that cleans up a lot of legacy code. However, we need to be cautious about maintaining backward compatibility. We can likely add some of the logic incrementally while keeping compatibility for a few minor versions. After that, we can bump the major version and remove the compatibility handling code.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
commitizen/commands/bump.py Outdated
| return bump.find_increment(commits, regex=bump_pattern, increments_map=bump_map) | ||
| return VersionIncrement.get_highest_by_messages( | ||
| (commit.message for commit in commits), | ||
| lambda x: self.cz.bump_rule.get_increment(x, is_major_version_zero), |
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.
this might be a breaking change for other non-standardczs
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.
We'll need a way to keep backward compatibility or move it to 5.0.0 instead (but that would be a pity since the PR looks os good)
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.
Could you provide more details about why this might be a breaking change for non-standardcz s? I am not familiar with non-standard cz. Thanks
Uh oh!
There was an error while loading.Please reload this page.
83c02fe to650c720Comparebb61b44 to9cacfcbComparebearomorphism commentedAug 24, 2025
Can we do squash rebase on this PR when it is ready for merge? |
Lee-W commentedAug 25, 2025
yep, I can do that |
bearomorphism commentedSep 8, 2025
What are the next steps for this PR? If there are backward compatibility issues, I can adjust it so that this PR can be checked in. Thanks |
6d0aa11 to972d9f5CompareThere 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.
Core feature change
bearomorphism commentedSep 25, 2025
We can get back to this PR after#1598 |
9c8389a to9914febCompare9914feb to9644e1aComparebearomorphism commentedNov 11, 2025
@Lee-W It would be great if we can complete this big PR. I can fix those backward-compatibility issues, but I need more details so I can address the issues. |
bearomorphism commentedNov 11, 2025
(I've resolved merge conflicts for several times for this PR) |
Lee-W commentedNov 13, 2025
This would fall into |
bearomorphism commentedJan 6, 2026
A lot of conflicts... I will probably create another branch and do the change again... |
Related issue:#129
Original PR:#1431
Description
Please see
bump_rule.py,bump.py,cz/base.py,version_scheme.pyandcommands/bump.py(~350 lines).The rest 1000+ lines are just tests and renaming.
CustomBumpRule.Simplified code.SemVerIncrementand replaceMAJOR,MINOR,PATCHwith the Enum.Prereleaseis Enum.find_incrementlogic inSemVerIncrement.get_highest_by_messages.find_incrementwas the combination of 2 features: "finding the highest semantic version increment" and "parsing the semantic version increment from each git commit message".Checklist
Code Changes
poetry alllocally to ensure this change passes linter check and testsDocumentation Changes
poetry doclocally to ensure the documentation pages renders correctlyExpected Behavior
Steps to Test This Pull Request
Additional Context