diff --git a/.github/workflows/pr-check.rb b/.github/workflows/pr-check.rb index 8b25210..f13b034 100644 --- a/.github/workflows/pr-check.rb +++ b/.github/workflows/pr-check.rb @@ -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