Repository navigation
Fix SCM provider to only search tags that are reachable by the current commit - #975
Merged
Merged
Conversation
chadrik
force-pushed
the
scm-tagging-workflow
branch
3 times, most recently
from
January 30, 2024 18:32
ead221b to
17f106c
Compare
woile
approved these changes
Feb 1, 2024
chadrik
force-pushed
the
scm-tagging-workflow
branch
from
February 3, 2024 01:52
4768ece to
3efca40
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #975 +/- ##
==========================================
+ Coverage 97.33% 97.38% +0.04%
==========================================
Files 42 55 +13
Lines 2104 2373 +269
==========================================
+ Hits 2048 2311 +263
- Misses 56 62 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
chadrik
force-pushed
the
scm-tagging-workflow
branch
2 times, most recently
from
February 3, 2024 02:29
dca166e to
f0dc835
Compare
Contributor
Author
|
codecov is failing, but I don't know what else to test. Any ideas? |
The scm provider requires tags to be the source of truth for the current version, instead of files. Therefore, the current version should be the highest tag version upstream from the current commit.
chadrik
force-pushed
the
scm-tagging-workflow
branch
from
February 3, 2024 02:35
f0dc835 to
dfd0b0c
Compare
woile
reviewed
Feb 3, 2024
chadrik
force-pushed
the
scm-tagging-workflow
branch
from
February 3, 2024 17:53
b9013b0 to
23516be
Compare
Contributor
Author
|
I keep adding tests but the codecov is not improving. Any suggeestions? |
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
The scm provider currently uses all of the tags in the repo to determine the current version, but it should instead only consider tags that are upstream from the current commit. This means commitizen currently consider tags that are in the future or on other branches when determining the version. This doesn't make sense. The pep621 provider doesn't determine the current version from the latest commit of
pyproject.tomlor from commits on other branches, it looks at the current state of the repo.Checklist
./scripts/formatand./scripts/testlocally to ensure this change passes linter check and testExpected behavior
The expected behavior is that the current version should be determined by the "highest" version tag reachable by the current commit. In order to determine "highest" I had to add sortability to
VersionProtocol, but luckily this is already implemented byBaseVersion.Steps to Test This Pull Request
Additional context