Skip to content

Commit

Permalink
pr-check: Apply a stable sort
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs committed Mar 6, 2024
1 parent 8654ab9 commit 7f993c3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/pr-check.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ def next_state(state)

def sort_and_check(arr, label)
begin
sorted = arr.sort_by{|l| l.scan(/^\| \[([^\]]+)\]/).first.first.downcase }
sorted = arr.sort_by.with_index{|l,i|
[ l.scan(/^\| \[([^\]]+)\]/).first.first.downcase, i ]
}
rescue => e
return false
end
Expand Down

0 comments on commit 7f993c3

Please sign in to comment.