-
Notifications
You must be signed in to change notification settings - Fork 155
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
Add verbose information to version generation logic #844
Open
tomasz-pankowski-allegro
wants to merge
9
commits into
allegro:main
Choose a base branch
from
tomasz-pankowski-allegro:826-verbose-logs-for-version-selection
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
305b0c1
Add verbose information to version generation logic
tomasz-pankowski-allegro bfa18e2
fix doc
tomasz-pankowski-allegro 0afbae0
change info level to quiet
tomasz-pankowski-allegro a3a0847
use debug logging level instead of verbose flag
tomasz-pankowski-allegro 9fb2666
clean up unimportant changes
tomasz-pankowski-allegro 5071c5c
clean up unimportant changes
tomasz-pankowski-allegro 2d8726d
refactor finding latest version
tomasz-pankowski-allegro c4ba148
after refactor inline logic of finding version number
tomasz-pankowski-allegro 621bb85
lifecycle is the default logging level, use it instead of debug
tomasz-pankowski-allegro 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 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 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 |
---|---|---|
|
@@ -41,7 +41,7 @@ class ScmPropertiesBuilder { | |
true, | ||
['main', 'master'] as Set, | ||
false, | ||
true | ||
true | ||
) | ||
} | ||
|
||
|
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.
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.
When this will happen? Since we are iterating through
taggedCommits
I would assume that each commit has at least 1 tag otherwise it would NOT betagged
🤔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 think that currently in the code there is actually no way for this class to have an empty tag collection, but there is also nothing in this class that would prevent the creation of such an instance. This class even has a special method for such an occasion ;) TagsOnCommit.empty() which creates an instance with an empty list of tags.
This code, I hope, will work correctly in both cases:
The advantage is that we don't have to wonder if someone really thought it was a great idea to pass an empty list to the TagsOnCommit constructor.
You can also set a contract for TagsOnCommit, the list of tags cannot be and then we throw an exception otherwise. Then you can easily simplify this code as you say.
But I'm not insisting, if you feel that this is an unnecessary complication then I'll let you convince me.
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.
Yeah but
TaggedCommits
!=TagsOnCommit
. So either name of the variable is wrong or the logic for filling theTaggedCommits
class is wrong. But ifTaggedCommits
does not contain the check for problematic it would be nice to have it there.I personally would not check for it like this, but I am not insisting on it.