-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Fix actions skipped commit status indicator #34507
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
base: main
Are you sure you want to change the base?
Conversation
Seems good, but I wonder whether the other two missing statuses from action model should also be represented in commit status. Currently "blocked" and "unknown" are missing: gitea/models/actions/status.go Lines 15 to 24 in 14bb8f7
|
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.
Change is LGMT but we should review the other two potential missing states 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.
For consistency maybe add add
// IsSkipped represents if commit status state is skipped
func (css CommitStatusState) IsSkipped() bool {
return css == CommitStatusSkipped
}
@@ -18,6 +18,8 @@ const ( | |||
CommitStatusFailure CommitStatusState = "failure" | |||
// CommitStatusWarning is for when the CommitStatus is Warning | |||
CommitStatusWarning CommitStatusState = "warning" | |||
// CommitStatusSkipped is for when CommitStatus is Skipped | |||
CommitStatusSkipped CommitStatusState = "skipped" | |||
) | |||
|
|||
var commitStatusPriorities = map[CommitStatusState]int{ |
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.
Are commit statuses correctly merged with this change?
In Pull Request Status / Merged Commit Status Icon
I looked at other locations of the other constants.
e.g. assign skipped value 5
The compare method returns false in both directions if not part of commitStatusPriorities e.g. making a stable sort impossible.
Addresses #34500