-
-
Notifications
You must be signed in to change notification settings - Fork 297
feat(bump_rule): add BumpRule, VersionIncrement, Prerelease Enum #1518
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
feat(bump_rule): add BumpRule, VersionIncrement, Prerelease Enum #1518
Conversation
bb305ad
to
8a6c84f
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@ ## v4-9-0-test #1518 +/- ## ============================================== Coverage ? 98.35% ============================================== Files ? 59 Lines ? 2735 Branches ? 0 ============================================== Hits ? 2690 Misses ? 45 Partials ? 0
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
to
8dd8d42
Compare
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.
commitizen/bump_rule.py
Outdated
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.
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.
Done.
commitizen/commands/bump.py
Outdated
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-standard cz
s
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-standard cz
s? I am not familiar with non-standard cz. Thanks
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.
I guess we'll be able to remove them in the next major version?
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.
probably yes
83c02fe
to
650c720
Compare
bb61b44
to
9cacfcb
Compare
Can we do squash rebase on this PR when it is ready for merge?
Can we do squash rebase on this PR when it is ready for merge?
yep, I can do that
...l sites of get_version
...ig function for readability
69db5b4
to
b313847
Compare
Original "push" stage has been deprecated since pre-commit v3.2.0. See pre-commit/pre-commit#2732 and pre-commit/pre-commit#2808 for detailed information.
...rk unused for get_smart_tag_range
3cf6689
to
6d0aa11
Compare
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
c700d66
to
8b969db
Compare
Related issue: #129
Original PR: #1431
Description
Please see
bump_rule.py
,bump.py
,cz/base.py
,version_scheme.py
andcommands/bump.py
(~350 lines).The rest 1000+ lines are just tests and renaming.
CustomBumpRule
.(削除) Simplified code. (削除ここまで)SemVerIncrement
and replaceMAJOR
,MINOR
,PATCH
with the Enum.Prerelease
is Enum.find_increment
logic inSemVerIncrement.get_highest_by_messages
.find_increment
was 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 all
locally to ensure this change passes linter check and testsDocumentation Changes
poetry doc
locally to ensure the documentation pages renders correctlyExpected Behavior
Steps to Test This Pull Request
Additional Context