-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Description
Describe the bug
What is passed to the calculateRank
function depends on whether include_all_commits
was orignally true or not.
So if you pass include_all_commits=True you generally get a much better rank than if you do not.
In my case normal commits (for the current year) was ~2000 giving me an A++ rank. If I use include_all_commits=true then 12000 is passed and I get an S rank.
github-readme-stats/src/fetchers/stats-fetcher.js
Lines 119 to 142 in 7907a5d
// normal commits | |
stats.totalCommits = user.contributionsCollection.totalCommitContributions; | |
// if include_all_commits then just get that, | |
// since totalCommitsFetcher already sends totalCommits no need to += | |
if (include_all_commits) { | |
stats.totalCommits = await totalCommitsFetcher(username); | |
} | |
// if count_private then add private commits to totalCommits so far. | |
if (count_private) { | |
stats.totalCommits += | |
user.contributionsCollection.restrictedContributionsCount; | |
} | |
stats.totalPRs = user.pullRequests.totalCount; | |
stats.contributedTo = user.repositoriesContributedTo.totalCount; | |
stats.totalStars = user.repositories.nodes.reduce((prev, curr) => { | |
return prev + curr.stargazers.totalCount; | |
}, 0); | |
stats.rank = calculateRank({ | |
totalCommits: stats.totalCommits, |
Expected behavior
one of these two values (total for the year, or total for all periods) should be passed to the function probably.
Screenshots / Live demo link (paste the github-readme-stats link as markdown image)
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.