Skip to content

Commit 1058811

Browse files
Merge pull request #427 from iFixit/sorting--recent-first
Sorting: Let's move new pulls to the top
2 parents 69ad0c8 + 33127ff commit 1058811

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

frontend/src/pulldasher/sort.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ export function defaultCompare(a: Pull, b: Pull): number {
99
// Pulls I have to CR/QA above those I don't
1010
compareBool(a.hasOutdatedSig(getUser()), b.hasOutdatedSig(getUser())) ||
1111
// Pulls I haven't touched vs those I have already CRed
12-
compareBool(!a.hasCurrentSig(getUser()), !b.hasCurrentSig(getUser()))
12+
compareBool(!a.hasCurrentSig(getUser()), !b.hasCurrentSig(getUser())) ||
13+
// younger pulls above older pulls so new things get review sooner
14+
b.created_at.localeCompare(a.created_at)
1315
);
1416
}
1517

@@ -25,8 +27,8 @@ export function QACompare(a: Pull, b: Pull): number {
2527
compareBool(!a.getLabel("QAing"), !b.getLabel("QAing")) ||
2628
// Pulls with CR completed above those that need more
2729
compareBool(a.isCrDone(), b.isCrDone()) ||
28-
// Older pulls before younger pulls
29-
a.created_at.localeCompare(b.created_at)
30+
// younger pulls before older pulls
31+
b.created_at.localeCompare(a.created_at)
3032
);
3133
}
3234

0 commit comments

Comments
 (0)