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

Wrong amount of stars #119

Open
shadowoff09 opened this issue Nov 8, 2024 · 3 comments
Open

Wrong amount of stars #119

shadowoff09 opened this issue Nov 8, 2024 · 3 comments

Comments

@shadowoff09
Copy link

shadowoff09 commented Nov 8, 2024

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.

@jstrieb
Copy link
Owner

jstrieb commented Nov 8, 2024

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.

contributionTypes: [
COMMIT,
PULL_REQUEST,
REPOSITORY,
PULL_REQUEST_REVIEW
]

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).

raw_ignore_forked_repos = os.getenv("EXCLUDE_FORKED_REPOS")
ignore_forked_repos = (
not not raw_ignore_forked_repos
and raw_ignore_forked_repos.strip().lower() != "false"
)

@shadowoff09
Copy link
Author

shadowoff09 commented Nov 8, 2024

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

@yewentao256
Copy link

yewentao256 commented Nov 8, 2024

Same issue +1
1731106355898

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants