Skip to content

Commit 01dcc46

Browse files
committed
Add funding and sort by repo owner with name after PR and Start count
1 parent 5370123 commit 01dcc46

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

.github/FUNDING.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# These are supported funding model platforms
2+
3+
custom: https://www.paypal.me/rgmz
4+
github: yaph

src/index.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,15 @@ async function run(): Promise<void> {
3030
}
3131
})
3232

33-
// Sort by prCount and then by starCount
33+
// Sort descending by prCount, then by starCount and finally ascending by repo owner with name
3434
let sortedRepos = new Map([...repos.entries()].sort((a, b) => {
35-
const diff = b[1].prCount - a[1].prCount
36-
if (diff !== 0) {
37-
return diff
38-
}
39-
return b[1].starCount - a[1].starCount
35+
let diff: any = b[1].prCount - a[1].prCount
36+
if (diff !== 0) return diff
37+
38+
diff = b[1].starCount - a[1].starCount
39+
if (diff !== 0) return diff
40+
41+
return a[0].starCount - b[0].starCount
4042
}))
4143

4244
// Create Markdown table

0 commit comments

Comments
 (0)