Fixed todo inside stats card data fetcher (#2649)

This commit is contained in:
Alexandr Garbuzov 2023-04-28 18:48:34 +03:00 committed by GitHub
parent a82a617a37
commit 31d1ab43d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View File

@ -29,13 +29,14 @@ const normalcdf = (mean, sigma, to) => {
/**
* Calculates the users rank.
*
* @param {number} totalRepos Total number of repos.
* @param {number} totalCommits Total number of commits.
* @param {number} contributions The number of contributions.
* @param {number} followers The number of followers.
* @param {number} prs The number of pull requests.
* @param {number} issues The number of issues.
* @param {number} stargazers The number of stars.
* @param {object} params Parameters on which the user's rank depends.
* @param {number} params.totalRepos Total number of repos.
* @param {number} params.totalCommits Total number of commits.
* @param {number} params.contributions The number of contributions.
* @param {number} params.followers The number of followers.
* @param {number} params.prs The number of pull requests.
* @param {number} params.issues The number of issues.
* @param {number} params.stargazers The number of stars.
* @returns {{level: string, score: number}}} The users rank.
*/
const calculateRank = ({

View File

@ -259,7 +259,6 @@ const fetchStats = async (
return prev + curr.stargazers.totalCount;
}, 0);
// @ts-ignore // TODO: Fix this.
stats.rank = calculateRank({
totalCommits: stats.totalCommits,
totalRepos: user.repositories.totalCount,