Skip to content

Commit 6d1687c

Browse files
qwerty541LucienZhang
authored andcommitted
Fixed todo inside stats card data fetcher (anuraghazra#2649)
1 parent 1b26710 commit 6d1687c

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/calculateRank.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,14 @@ const normalcdf = (mean, sigma, to) => {
2929
/**
3030
* Calculates the users rank.
3131
*
32-
* @param {number} totalRepos Total number of repos.
33-
* @param {number} totalCommits Total number of commits.
34-
* @param {number} contributions The number of contributions.
35-
* @param {number} followers The number of followers.
36-
* @param {number} prs The number of pull requests.
37-
* @param {number} issues The number of issues.
38-
* @param {number} stargazers The number of stars.
32+
* @param {object} params Parameters on which the user's rank depends.
33+
* @param {number} params.totalRepos Total number of repos.
34+
* @param {number} params.totalCommits Total number of commits.
35+
* @param {number} params.contributions The number of contributions.
36+
* @param {number} params.followers The number of followers.
37+
* @param {number} params.prs The number of pull requests.
38+
* @param {number} params.issues The number of issues.
39+
* @param {number} params.stargazers The number of stars.
3940
* @returns {{level: string, score: number}}} The users rank.
4041
*/
4142
const calculateRank = ({

src/fetchers/stats-fetcher.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,6 @@ const fetchStats = async (
259259
return prev + curr.stargazers.totalCount;
260260
}, 0);
261261

262-
// @ts-ignore // TODO: Fix this.
263262
stats.rank = calculateRank({
264263
totalCommits: stats.totalCommits,
265264
totalRepos: user.repositories.totalCount,

0 commit comments

Comments
 (0)