Skip to content
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

[Bug] Stat card private content wrong number of PRs #2621

Closed
icandac opened this issue Apr 18, 2023 · 5 comments
Closed

[Bug] Stat card private content wrong number of PRs #2621

icandac opened this issue Apr 18, 2023 · 5 comments
Labels
bug Something isn't working.

Comments

@icandac
Copy link

icandac commented Apr 18, 2023

Describe the bug

There occurs an error in the statcard when the "count_private=true" option is included. I know my number of commits and PRs.

Number of commits is close to the actual number, but I guess it misses some commits as well, but Total number of PRs is %100 wrong. It shows here 1 for me for the last 3.5 half months but I at least opened 20 of them, and also my badge corrects me.

I don't know with which API the private commits are taken but there is an issue with that for sure.

Expected behaviour

I expect to see the correct number of PRs on the stat-card (and maybe for the commits as well).

Screenshots / Live demo link

image

image

Additional context

No response

@icandac icandac added the bug Something isn't working. label Apr 18, 2023
@icandac icandac changed the title Stat card private content wrong number of PRs [Bug] Stat card private content wrong number of PRs Apr 18, 2023
@Furkan-Ozdemir
Copy link

I have the same issue. I think it doesn't count private repo prs

@icandac
Copy link
Author

icandac commented Apr 20, 2023

I have the same issue. I think it doesn't count private repo prs

I later noticed that it does, indeed. But it is still a bug since it just considers the PRs after the stat card is created.

@akshayaureatelabs
Copy link

@icandac @Furkan-Ozdemir Hello,

The bug you described is related to the statcard when the "count_private=true" option is included. The expected behavior is to see the correct number of PRs on the stat-card, and possibly the correct number of commits as well. Currently, the number of commits is close to the actual number, but it may miss some commits, and the total number of PRs is 100% wrong.

It appears that the API used to fetch private commits is causing the issue. The API may not be able to retrieve all the private commits and PRs, resulting in an inaccurate count on the stat-card.

To fix this bug, you may need to investigate the API used to fetch the private commits and PRs, and see if there are any limitations or issues with it. You may also want to check if there are any alternative APIs that can be used to fetch the private commits and PRs. Once you have identified the issue, you can work on updating the code to ensure that the correct number of PRs and commits are displayed on the stat-card.

@rickstaa
Copy link
Collaborator

@icandac @Furkan-Ozdemir Hello,

The bug you described is related to the statcard when the "count_private=true" option is included. The expected behavior is to see the correct number of PRs on the stat-card, and possibly the correct number of commits as well. Currently, the number of commits is close to the actual number, but it may miss some commits, and the total number of PRs is 100% wrong.

It appears that the API used to fetch private commits is causing the issue. The API may not be able to retrieve all the private commits and PRs, resulting in an inaccurate count on the stat-card.

To fix this bug, you may need to investigate the API used to fetch the private commits and PRs, and see if there are any limitations or issues with it. You may also want to check if there are any alternative APIs that can be used to fetch the private commits and PRs. Once you have identified the issue, you can work on updating the code to ensure that the correct number of PRs and commits are displayed on the stat-card.

@akshayaureatelabs thank you so much for answering this question🙏🏻! To add to your answer, the count_private variable regards the commits and only works if people share their private contributions to their profile. A discussion on why this variable is confusing and should be deprecated is found in #2517.

@rickstaa
Copy link
Collaborator

@icandac the best way to get the most accurate results is to deploy your own Vercel instance (see https://github.com/anuraghazra/github-readme-stats#deploy-on-your-own). More accurate results will be possible when the GitHub action is released (see #2179).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working.
Projects
None yet
Development

No branches or pull requests

4 participants