@@ -570,17 +570,19 @@ export const MergeSelect = React.forwardRef<HTMLSelectElement, MergeSelectProps>
570570 } ,
571571) ;
572572
573+ // State order for sorting status checks: failure first, then pending, neutral, success, and unknown
574+ const CHECK_STATE_ORDER : Record < CheckState , number > = {
575+ [ CheckState . Failure ] : 0 ,
576+ [ CheckState . Pending ] : 1 ,
577+ [ CheckState . Neutral ] : 2 ,
578+ [ CheckState . Success ] : 3 ,
579+ [ CheckState . Unknown ] : 4 ,
580+ } ;
581+
573582const StatusCheckDetails = ( { statuses } : { statuses : PullRequestCheckStatus [ ] } ) => {
574583 // Sort statuses to group by state: failure first, then pending, neutral, and success
575584 const sortedStatuses = [ ...statuses ] . sort ( ( a , b ) => {
576- const stateOrder : Record < CheckState , number > = {
577- [ CheckState . Failure ] : 0 ,
578- [ CheckState . Pending ] : 1 ,
579- [ CheckState . Neutral ] : 2 ,
580- [ CheckState . Success ] : 3 ,
581- [ CheckState . Unknown ] : 4 ,
582- } ;
583- return stateOrder [ a . state ] - stateOrder [ b . state ] ;
585+ return CHECK_STATE_ORDER [ a . state ] - CHECK_STATE_ORDER [ b . state ] ;
584586 } ) ;
585587
586588 return (
0 commit comments