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.
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
Changelog tool - Implement robust version incrementing logic #679
base: dev/changelog
Are you sure you want to change the base?
Changelog tool - Implement robust version incrementing logic #679
Changes from all commits
fc7819b
0e3e296
ee5f987
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 doesn't sound right to me, I would expect only the
pre.is_empty()
check to be needed. In the other case, we don't want a new release but just to callincrement_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.
I don't think this function will be useful once the test above is fixed. We probably want 2 functions:
-git
).That last function could really just be:
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'm struggling to understand at a higher level. Could you explain how you see those 2 functions being used?
I think some examples of when we want to create a new release vs just increment version would be helpful.
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.
In
push_description()
you have:Those 2 conditions should not be conflated because they result in different actions:
More concretely, using the format
<latest version> <change severity> -> <action>
:1.0.0 patch -> create 1.0.1-git with Patch
1.0.0 minor -> create 1.1.0-git with Minor
1.0.0 major -> create 2.0.0-git with Major
1.2.3-git patch -> nothing
1.2.3-git minor -> update from 1.2.3-git to 1.3.0-git inserting Minor
1.2.3-git major -> update from 1.2.3-git to 2.0.0-git inserting Major
0.1.0 minor -> create 0.1.1-git with Minor
(same for patch/Patch)0.1.0 major -> create 0.2.0-git with Major
0.1.2-git minor -> insert Minor if absent
(same for patch/Patch)0.1.2-git major -> update from 0.1.2-git to 0.2.0-git inserting Major
An action of
create
means to prepend a new version. An action ofupdate
means to simple change the version without changing the list of versions.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 broke the invariant that we have only one pre-release per changelog. It's not enough to check the latest release.