Skip to content

Commit

Permalink
Fixed todo inside stats card data fetcher (anuraghazra#2649)
Browse files Browse the repository at this point in the history
  • Loading branch information
qwerty541 authored and LucienZhang committed Jun 5, 2023
1 parent 1b26710 commit 6d1687c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
15 changes: 8 additions & 7 deletions src/calculateRank.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ({
Expand Down
1 change: 0 additions & 1 deletion src/fetchers/stats-fetcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 6d1687c

Please sign in to comment.