github-readme-stats: Personal Instance with Repo Access PAT Cannot Read Yearly Commit Correctly

Describe the bug

Update 6/10: Current situation explained in https://github.com/anuraghazra/github-readme-stats/issues/2793#issuecomment-1585832224


Sorry I know this have been asking multiple times recently, I have been using my own vercel instance for months and everything worked well until I synced my fork yesterday and remove count_private was inplemented. Yesterday it shows 300+ commits but today it’s 200+.

Counted from my contribution activity it should be 300ish in 2023, if it is last year from June 2022 to June 2023 it will be 400ish.

Top language seems working properly since the percentage didn’t change much from yesterday but status card only shows public commits now? If I add include_all_commits=true the commit number(1.3K for all years) seems contain all my commits regardless of private or public repo.

I recreated a vercel instance based on 38c8a7a with a new PAT granted repo access, but the behavior is still the same.

Am I missing any argument?

Expected behavior

Status card includes commits to private repo as well.

Screenshots / Live demo link

include_all_commits

normal

https://github.com/ForsakenRei/ForsakenRei

From official instance include_all_commits

normal

Additional context

No response

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 3
  • Comments: 26 (11 by maintainers)

Commits related to this issue

Most upvoted comments

My new results after giving the read:user permission to my PAT:

Public results

[![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=rickstaa&random=122243)](https://github.com/anuraghazra/github-readme-stats)

Anurag's GitHub stats

[![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=rickstaa&include_all_commits=true&random=122243)](https://github.com/anuraghazra/github-readme-stats)

Anurag's GitHub stats

Private results

[![Anurag's GitHub stats](https://github-readme-stats-rickstaa.vercel.app/api?username=rickstaa&random=122243)](https://github.com/anuraghazra/github-readme-stats)

Anurag's GitHub stats

[![Anurag's GitHub stats](https://github-readme-stats-rickstaa.vercel.app/api?username=rickstaa&include_all_commits=true&random=122423)](https://github.com/anuraghazra/github-readme-stats)

Anurag's GitHub stats

I mean, the issue for private commit is not solved yet…or it just cannot be solved now? If my PAT has the correct permission and I’m using my own instance(most used language also provided evidence) I should see 412 instead of 268 commits, but now I got exact the same number regardless I’m using the official instance or my own.

The Rest API is buggy and is therefore only when include_all_commits=true. If you want to check whether the yearly commits are correct you should compare it with the GraphQL response when you are logged it. It’s very hard for me to help you since I don’t have access to your account and can not reproduce the issue on my accounts. I think the best thing to do is:

  1. Fork the repository.
  2. Ensure that it is up to date with the main branch of the upstream.
  3. Build the GRS package locally (see https://github.com/anuraghazra/github-readme-stats/blob/master/CONTRIBUTING.md#local-development).
  4. Install vscode.
  5. Put debug statements before the API calls:

https://github.com/anuraghazra/github-readme-stats/blob/44c268e05ad6b9eb572810a2d71f043900d4cd2e/src/fetchers/stats-fetcher.js#L146-L156

https://github.com/anuraghazra/github-readme-stats/blob/44c268e05ad6b9eb572810a2d71f043900d4cd2e/src/fetchers/stats-fetcher.js#L196

  1. Check what the the APIs return in the code.

Let me know if you need any help.

Thanks, I will probably try to build locally later today. Now I want to try deleting my fork and fork a new one then deploy a fresh instance, but Vercel is taking forever to import the repo, will update if it works on not once it goes through.