github-stats
github-stats copied to clipboard
Wrong amount of stars
Hey, my script is saying that i have 2009 stars, and i dont know from where that value comes from because i dont that many stars.
Hi @shadowoff09! There are a number of reasons this could be happening. This code counts the stars (and stats) of any repo you have contributed to, or any repo that marks you as a "contributor." You can be added to a repo as a contributor even if you haven not pushed any commits to it.
https://github.com/jstrieb/github-stats/blob/ce37fed0508deef4a208041b5b148fbe2918b1c0/github_stats.py#L167-L172
If you only want to show owned repositories, set the environment variable EXCLUDE_FORKED_REPOS=true wherever this code is running (GitHub Actions or elsewhere).
https://github.com/jstrieb/github-stats/blob/ce37fed0508deef4a208041b5b148fbe2918b1c0/generate_images.py#L118-L122
Thank you for the reponse @jstrieb.
The variable EXCLUDE_FORKED_REPOS is set to true in the main workflow, and the stars are still the same.
As you can see here: https://github.com/shadowoff09/github-stats/blob/master/.github/workflows/main.yml
Same issue +1
I think you need to specify the variable in the main.yaml file
@jstrieb EXCLUDE_FORKED_REPOS is true in my workflow, but it still counts stars and languages from a repo I have contributed to: https://github.com/Giorgi/github-stats/blob/7660e5a6b147e252c4826ea93807eb47f6255c2d/.github/workflows/main.yml#L45