Skip to content

Commit

Permalink
fix: bug fix to address issue Longhorn-Developers#363
Browse files Browse the repository at this point in the history
  • Loading branch information
Preston-Cook committed Oct 21, 2024
1 parent b967240 commit 8c4de9b
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/views/components/settings/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,11 @@ export default function Settings(): JSX.Element {
admin => admin.githubUsername === username
) && !LONGHORN_DEVELOPERS_SWE.some(swe => swe.githubUsername === username)
)
.sort(
(a, b) =>
(githubStats.userGitHubStats[b]?.commits ?? 0) -
(githubStats.userGitHubStats[a]?.commits ?? 0)
)
.map(username => (
<div
key={username}
Expand Down
55 changes: 55 additions & 0 deletions test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
const obj = {
adminGitHubStats: {
IsaDavRod: { commits: 3, linesAdded: 2397, linesDeleted: 1227 },
'Lukas-Zenick': { commits: 22, linesAdded: 1296, linesDeleted: 1874 },
Samathingamajig: { commits: 42, linesAdded: 3657, linesDeleted: 2614 },
DereC4: { commits: 53, linesAdded: 22263, linesDeleted: 364 },
Razboy20: { commits: 95, linesAdded: 43134, linesDeleted: 86766 },
doprz: { commits: 104, linesAdded: 59892, linesDeleted: 30046 },
sghsri: { commits: 307, linesAdded: 85052, linesDeleted: 55359 },
},
userGitHubStats: {
chrisnunes57: { commits: 1, linesAdded: 1, linesDeleted: 1 },
'yahya-kousa': { commits: 1, linesAdded: 3, linesDeleted: 2 },
EthanL06: { commits: 1, linesAdded: 4, linesDeleted: 4 },
roccovp3: { commits: 1, linesAdded: 7, linesDeleted: 2 },
lanc33llis: { commits: 1, linesAdded: 2, linesDeleted: 2 },
darshanbhatta: { commits: 2, linesAdded: 37, linesDeleted: 15 },
vinsonzheng499: { commits: 2, linesAdded: 45, linesDeleted: 39 },
vivek12311: { commits: 2, linesAdded: 3145, linesDeleted: 504 },
mas0nd: { commits: 3, linesAdded: 42, linesDeleted: 43 },
caseycharleston: { commits: 5, linesAdded: 639, linesDeleted: 179 },
omajoshi: { commits: 6, linesAdded: 56, linesDeleted: 27 },
abhinavchadaga: { commits: 15, linesAdded: 2202, linesDeleted: 1156 },
tadakda: { commits: 22, linesAdded: 17350, linesDeleted: 608 },
'DhruvArora-03': { commits: 22, linesAdded: 1270, linesDeleted: 549 },
knownotunknown: { commits: 42, linesAdded: 15420, linesDeleted: 2773 },
},
contributors: [
'chrisnunes57',
'yahya-kousa',
'EthanL06',
'roccovp3',
'lanc33llis',
'darshanbhatta',
'vinsonzheng499',
'vivek12311',
'mas0nd',
'IsaDavRod',
'caseycharleston',
'omajoshi',
'abhinavchadaga',
'tadakda',
'Lukas-Zenick',
'DhruvArora-03',
'knownotunknown',
'Samathingamajig',
'DereC4',
'Razboy20',
'doprz',
'sghsri',
],
dataFetched: '2024-10-21T18:40:06.016Z',
lastUpdated: '2024-10-21T18:40:06.016Z',
isCached: false,
};

0 comments on commit 8c4de9b

Please sign in to comment.