diff --git a/api/src/contributor/repository.ts b/api/src/contributor/repository.ts index 15823e61..6906e3e2 100644 --- a/api/src/contributor/repository.ts +++ b/api/src/contributor/repository.ts @@ -50,7 +50,9 @@ export class ContributorRepository { ${contributorsTable.id}, ${contributorsTable.name}, ${contributorsTable.avatarUrl}, - sum(${contributorRepositoryRelationTable.score}) as ranking + sum(${contributorRepositoryRelationTable.score}) as total_contribution_score, + count(DISTINCT ${contributorRepositoryRelationTable.repositoryId}) as total_repository_count, + (sum(${contributorRepositoryRelationTable.score}) * count(DISTINCT ${contributorRepositoryRelationTable.repositoryId})) as ranking FROM ${contributorRepositoryRelationTable} JOIN diff --git a/api/src/contributor/types.ts b/api/src/contributor/types.ts index 85f15f8e..12cdbde8 100644 --- a/api/src/contributor/types.ts +++ b/api/src/contributor/types.ts @@ -5,6 +5,9 @@ export interface GetContributorsResponse extends GeneralResponse { contributors: Array< Pick & { ranking: number; + + totalContributionScore: number; + totalRepositoryCount: number; } >; } diff --git a/web/src/pages/team/index.tsx b/web/src/pages/team/index.tsx index 8d3df642..aede6380 100644 --- a/web/src/pages/team/index.tsx +++ b/web/src/pages/team/index.tsx @@ -46,15 +46,68 @@ export default function Page(): JSX.Element { {contributorsList.map((contributor, contributorIndex) => ( {contributor.name} - {contributor.name} +
+
+ {contributor.name} + {contributor.name} +
+
+
+ + + + + {contributor.totalContributionScore} +
+
+
+ {contributor.totalRepositoryCount} + + + + + +
+
+
))}