-
-
Notifications
You must be signed in to change notification settings - Fork 23.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider only counting unique commits #2655
Comments
@mathbunnyru thanks for your bug report. I could reproduce the bug below. It is caused by the fact that we use the GitHub rest API for the total commits. github-readme-stats/src/fetchers/stats-fetcher.js Lines 146 to 170 in fd64333
The behaviour is therefore as expected. You could create a pull request to improve the search query we use. We use the GitHub Rest API because of resource limitations in the GraphQL API (see https://docs.github.com/en/graphql/overview/resource-limitations). Fetching all commits through the GraphQL API, although more accurate, will result is in hitting the rate limiter faster. #1691 will fix this, but we cannot merge it into the main branch because of this. You can, however, already use that pull request on your own Vercel instance, since there you will likely not hit the GraphQL limits. We will likely release it under our new GitHub action (see #2179). Reproduce[![Mathbunnyru GitHub stats](https://github-readme-stats.vercel.app/api?username=Mathbunnyru)](https://github.com/anuraghazra/github-readme-stats) [![Mathbunnyru GitHub stats](https://github-readme-stats.vercel.app/api?username=Mathbunnyru&include_all_commits=true)](https://github.com/anuraghazra/github-readme-stats) |
Thank you! I think |
@mathbunnyru please don't use @Rongronggg9 Vercel instance as you will likely cause the GraphQL resource limits to be reached in the future when people follow your behaviour 😅(see https://docs.github.com/en/graphql/overview/resource-limitations). I would like to recommend you to create your own Vercel instance and merge #1691 into your main branch 🙏🏻(see https://github.com/anuraghazra/github-readme-stats#deploy-on-your-own). |
Ok, sorry @rickstaa, I will do what you suggest 😅 |
@rickstaa I don't think this is fixed yet. |
You're right, I have mistaken it with another issue related to the language results 👍🏻. |
You can also show your support for https://github.com/orgs/community/discussions/35675 which would allow us to solve this for the Vercel version. |
Describe the bug
I maintain a repository https://github.com/jupyter/docker-stacks/, which has 848 my commits.
Unfortunately, some users, instead of forking this repository, create their own copy.
This makes
github-readme-stats
count commits in this repos as well.https://github-readme-stats-eight-theta.vercel.app/api?username=mathbunnyru&show_icons=true&theme=solarized-light&include_all_commits=true
This chart shows 68.6k commits, which would be awesome, but it's approximately 40x-80x larger than the correct number.
If I search my commits I see all these duplicates: https://github.com/search?o=desc&s=committer-date&type=Commits&q=author%3Amathbunnyru&p=94
Expected behaviour
I expect
github-readme-stats
to parse the commits and only list the number of unique SHAs.This way it would show the real number of commits.
Screenshots / Live demo link
Additional context
No response
The text was updated successfully, but these errors were encountered: