Repository navigation
Conversation
The default version parser did not match PEP 440 development release tags such as 0.2.0.dev1. As a result, cz bump --devrelease created tags that were not recognized as version tags, and the next incremental changelog run failed with "No tag found to do an incremental changelog". Use the PEP 440 regular expression from the specification appendix, while keeping the version group and the -next pre-release support relied upon by existing tag formats. Closes commitizen-tools#1367
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2109 +/- ##
=======================================
Coverage 98.28% 98.28%
=======================================
Files 61 61
Lines 2864 2864
=======================================
Hits 2815 2815
Misses 49 49 ☔ View full report in Codecov by Harness. |
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
cz bump --devreleasecreates PEP 440 development release tags such as0.2.0.dev1. The default version parser did not match those tags, so they were dropped from the version tag list. The next incremental changelog run then failed withNo tag found to do an incremental changelog.This PR replaces the default version parser regex with the one specified in PEP 440's appendix, while keeping the
versiongroup and the-nextpre-release support that existing tag formats rely on. Now0.2.0.dev1-style tags are recognized as version tags, and bumping a dev release twice updates the incremental changelog correctly.Checklist
Was generative AI tooling used to co-author this PR?
Code Changes
uv run poe alllocally to ensure this change passes linter check and testsDocumentation Changes
uv run poe doclocally to ensure the documentation pages renders correctlyExpected Behavior
cz bump -d 0on0.1.0creates tag0.2.0.dev0and a changelog entrycz bump -d 1on0.2.0.dev0creates tag0.2.0.dev1and updates the incremental changelog without errorSteps to Test This Pull Request
version_provider = "uv",update_changelog_on_bump = true,changelog_incremental = true0.1.0, commitfeat: 2, runcz bump -d 0 --yesfeat: 3, runcz bump -d 1 --yes0.2.0.dev0and0.2.0.dev1sectionsAdditional Context
Fixes #1367