Open noirbizarre opened 3 hours ago
Attention: Patch coverage is 99.43182%
with 1 line
in your changes missing coverage. Please review.
Project coverage is 97.65%. Comparing base (
120d514
) to head (6eeeb41
). Report is 496 commits behind head on master.
Files with missing lines | Patch % | Lines |
---|---|---|
commitizen/commands/bump.py | 92.85% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Description
This PR add 2 new settings to handle tag formats;
legacy_tag_formats
allowing tag format to change over time while retaining the ability to work with legacy versionignored_tag_formats
to specify expected tag that should not raiseInvalidVersion
.So projects which change tag formats and have expected but non-version tags can have these settings:
By doing so, I had to start grouping tag handling and introduce a
tags.TagRules
object which is responsible for handling all tags rules, initially spread overtag_format
,version_scheme
s andversion_provider
sChecklist
./scripts/format
and./scripts/test
locally to ensure this change passes linter check and testExpected behavior
Steps to Test This Pull Request
version_provider = "scm"
(not mandatory but allows testing the full scope)tag_format
tag_format
inlegacy_tag_format
and define a newtag_format
tag_format
then:
random-*
toignored_tag_formats
random-tag
Additional context
There might be a 2nd PR handling a
changelog_version_format
setting to customize the version rendering in the changelog so:tag_format
changes