Unverified Commit c9257371 authored by Wolfgang Walther's avatar Wolfgang Walther
Browse files

workflows/labels: fix stale label date sorting

parent d7bb1922
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -246,8 +246,8 @@ jobs:
                    'unmarked_as_duplicate',
                  ].includes(event))
                  .map(({ created_at, updated_at, committer, submitted_at }) => new Date(updated_at ?? created_at ?? submitted_at ?? committer.date))
                  .sort()
                  .reverse()
                  // Reverse sort by date value. The default sort() sorts by string representation, which is bad for dates.
                  .sort((a,b) => b-a)
                  .at(0) ?? item.created_at
                )