-
Notifications
You must be signed in to change notification settings - Fork 28
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
PublishChecks step: The conclusion should be none when status is not completed #82
Merged
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
206f586
Changed conclusion status based on ChecksStatus
ThusithaDJ 4b9b748
Refactoring the implementation
ThusithaDJ 263e404
Fix PMD issues.
ThusithaDJ 3f39628
Update src/main/java/io/jenkins/plugins/checks/steps/PublishChecksSte…
ThusithaDJ b3c4522
Refactor unit tests
ThusithaDJ 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
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.
There's a rule on Github checks API that if the user is providing the conclusion, then the status should be automatically set as completed. And because most of our users are GitHub users and will most likely refer to this, so it would be strange for them if the conclusion is reset to none (although it's a misuse to set the status not as completed while setting the conclusion to be a success).
So I would move this logic to the setters. If the user calls the methods and sets the status to be
queued
orin_progress
, we just change the conclusion to be none; if the user sets the conclusion, we change the status to becompleted
again.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.
Ok sure, @XiongKezhi. But based on your comment, what if the user sets the status as
queued
orin_progress
and provides a conclusion? Conclusion should be whatever the value provided, and status should becompleted
, right?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.
The implementation should handle that, like GitHub will automatically set the status to be completed if the conclusion is provided. We just need to make the step easier to use IMO: they don't have to explicitly set the conclusion to be none.