scripts/update contributor list: optimize

This commit is contained in:
Adorian Doran
2026-03-23 08:53:52 +02:00
parent b32dd949d7
commit a7a1e5c480
2 changed files with 8 additions and 10 deletions

View File

@@ -47,16 +47,14 @@ function getList(contributorInfo: any[]) {
// Sort by the commit count. Honorific contributors are always first.
.sort(contributorOrderer)
.map((c) => {
let result = {
let pinnedInfo = PINNED_CONTRIBUTORS[c.login];
return {
name: c.login,
url: c.html_url
fullName: pinnedInfo?.fullName,
url: c.html_url,
role: pinnedInfo?.role
} as Contributor;
if (c.login in PINNED_CONTRIBUTORS) {
result = {...result, ...PINNED_CONTRIBUTORS[c.login]};
}
return result;
});
}