-
-
Notifications
You must be signed in to change notification settings - Fork 334
feat(version): add MANUAL_VERSION, --next and --patch to version command #1724
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 6 commits into
commitizen-tools:master
from
bearomorphism:feat-next-version
May 3, 2026
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
80732e0
feat(version): add MANUAL_VERSION, --next, and --patch to version com…
bearomorphism 32ef677
fix(test): align cz version --help fixtures per Python minor version
bearomorphism dc843c4
fix(version): improve coverage, UX, and docs for cz version
bearomorphism 2913d60
refactor(version_schemes): restore Version and VersionScheme type ali…
bearomorphism 1985e54
fix: address review comments on version command PR
bearomorphism 2ca5b7e
docs: add TODO comment for USE_GIT_COMMITS future work (#1678)
bearomorphism 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
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
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
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,33 @@ | ||
| from __future__ import annotations | ||
|
|
||
| from enum import IntEnum | ||
|
|
||
|
|
||
| class VersionIncrement(IntEnum): | ||
|
bearomorphism marked this conversation as resolved.
|
||
| """Semantic versioning bump increments. | ||
|
|
||
| IntEnum keeps a total order compatible with NONE < PATCH < MINOR < MAJOR | ||
| for comparisons across the codebase. | ||
|
|
||
| - NONE: no bump (docs-only / style commits, etc.) | ||
| - PATCH: backwards-compatible bug fixes | ||
| - MINOR: backwards-compatible features | ||
| - MAJOR: incompatible API changes | ||
| """ | ||
|
|
||
| NONE = 0 | ||
| PATCH = 1 | ||
| MINOR = 2 | ||
| MAJOR = 3 | ||
|
|
||
| def __str__(self) -> str: | ||
| return self.name | ||
|
|
||
| @classmethod | ||
| def from_value(cls, value: object) -> VersionIncrement: | ||
| if not isinstance(value, str): | ||
| return VersionIncrement.NONE | ||
| try: | ||
| return cls[value] | ||
| except KeyError: | ||
| return VersionIncrement.NONE | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.