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

Star Count Issue? #39

Closed
kingthorin opened this issue Jul 13, 2020 · 20 comments
Closed

Star Count Issue? #39

kingthorin opened this issue Jul 13, 2020 · 20 comments

Comments

@kingthorin
Copy link
Contributor

Maybe I'm not understanding what "Total Stars" is supposed to represent but shouldn't these values match?

image

@anuraghazra
Copy link
Owner

Those are two different values.

In the first image those are the repos that i starred, and on the second image it count how many stars i gained.

@kingthorin
Copy link
Contributor Author

kingthorin commented Jul 13, 2020

Do you mean across a dev's repos? Or is there a way to actually give a github user stars? (That might be a newb question, but I honestly don't see user/account stars functionality anywhere, but could be overlooking it.)

Either way something still seems off. For example for myself it shows 1.4k stars, however, I have like one actual repo with one star and one fork with one star (dunno who would star a fork).

Edit: If I look at https://api.github.com/users/kingthorin/repos I definitely only see 2 stars, not 1.4k:
image

Edit2: Also if you access your repos and filter for stargazers_count there's not 1k:

    "stargazers_count": 0,
    "stargazers_count": 0,
    "stargazers_count": 0,
    "stargazers_count": 0,
    "stargazers_count": 0,
    "stargazers_count": 8,
    "stargazers_count": 35,
    "stargazers_count": 0,
    "stargazers_count": 1,
    "stargazers_count": 0,
    "stargazers_count": 0,
    "stargazers_count": 0,
    "stargazers_count": 6,
    "stargazers_count": 0,
    "stargazers_count": 0,
    "stargazers_count": 0,
    "stargazers_count": 0,
    "stargazers_count": 0,
    "stargazers_count": 0,
    "stargazers_count": 0,
    "stargazers_count": 0,
    "stargazers_count": 0,
    "stargazers_count": 68,
    "stargazers_count": 0,
    "stargazers_count": 2,
    "stargazers_count": 0,
    "stargazers_count": 32,
    "stargazers_count": 0,
    "stargazers_count": 0,
    "stargazers_count": 1,

@anuraghazra
Copy link
Owner

anuraghazra commented Jul 13, 2020

Okay i think it's also fetching the forked repo's stars, will fix it.

EDIT: well that's weird if it was fetching fork repo's stars then i would probably have 500k stars because i have lot of popular repos forked

@kingthorin
Copy link
Contributor Author

I'll keep poking around and see if I can figure out what's going on.

@anuraghazra
Copy link
Owner

Ahh i see got it. i think it's also fetching the repos you contributed to and counting those stars too.

@anuraghazra
Copy link
Owner

The updated gql query should be like this to filter only the OWNER repos and also filtering forked repos

repositories(first: 100, ownerAffiliations: OWNER, isFork: false, orderBy: {direction: DESC, field: STARGAZERS}) {
      totalCount
      nodes {
        nameWithOwner
        url
        stargazers {
          totalCount
        }
      }
    }

@kingthorin
Copy link
Contributor Author

That seems logical.

@anuraghazra
Copy link
Owner

Well yes, after testing it out with the new query, you have total of 1 star @kingthorin

@kingthorin
Copy link
Contributor Author

Thanks that makes sense. Sad stat but that's not on you 😉

@anuraghazra
Copy link
Owner

anuraghazra commented Jul 13, 2020

although you still got S+ rank 😄

I think the ranking algorithm needs to be improved.

@kingthorin
Copy link
Contributor Author

Well I'm a heavy contributor and just started the single star public repo in the last few months. So it probably makes sense.... I'm also not really a stats junky, I just came across this with the news of profile READMEs 👍 Where do you see the S+ rank you mentioned?

@anuraghazra
Copy link
Owner

Its a new feature, just deployed few mins ago.

@kingthorin
Copy link
Contributor Author

So I don't mean to be a pest or anything but do you plan to deploy the fix for this soon'ish? 😀

@anuraghazra
Copy link
Owner

Yup don't worry I'll fix it but firstly I need to fix 2 things.

#51 (high priority)
#49 (medium priority)

Then this one otherwise it'll make the rating system more biased

@kingthorin
Copy link
Contributor Author

kingthorin commented Jul 15, 2020

Thanks for tackling this!

Edit: Confirming fix deployed 😀
image

anuraghazra added a commit that referenced this issue Jul 16, 2020
* improve: improved rating algorithm wip

* Fixed typos, punctuation [...]

Corrected many instances of "Github" to "GitHub", fixed the punctuation on some sections, fixed the ~lack of~ uppercase chars in others, tweaked the grammar a bit, and added the Vercel guide to a spoiler-ish section so it's only visible if you click to expand.

<3

* fix: github rate limiter with multiple PATs

* perf: vertically align text left

* refactor: refactored retryer logic & handled invalid tokens

* chore: remove redundant codes

`axios` is Promise based, there is no need to wrap it into a Promise constructor again

* fix: query param booleans

* design: fixed rank alignment

* chore: rebase from master

* fix: fixed repo card breaking in absence of primaryLanguage

* fix: fixed stars count #39 & fixed progressbar percentage

* perf: replace emoji icons with GitHub SVG icons

* chore: added funding link

* refactor: refacted icons to another file

* test: added test for icons

Co-authored-by: anuraghazra <[email protected]>
Co-authored-by: Micael Jarniac <[email protected]>
Co-authored-by: JounQin <[email protected]>
infinity-plus referenced this issue in infinity-plus/github-readme-stats Jul 16, 2020
…-stats

 By anuraghazra (9) and others
 Via GitHub (12) and anuraghazra (1)
* 'master' of https://github.com/anuraghazra/github-readme-stats:
  perf: align icons and text vertical (#33)
  chore: added funding link
  fix: fixed stars count #39 & fixed progressbar percentage
  fix: fixed repo card breaking in absence of primaryLanguage
  chore: rebase from master
  design: fixed rank alignment
  fix: query param booleans
  chore: remove redundant codes
  refactor: refactored retryer logic & handled invalid tokens
  fix: github rate limiter with multiple PATs
  Fixed typos, punctuation [...]
  Crop the image a bit
  Fix img positions
  Add documentation for Vercel setup
  feat: added animations!
  improve: improved rating algorithm wip

 Conflicts:
	readme.md
	src/getStyles.js
	src/renderStatsCard.js
@elliottzheng
Copy link

I think that's not right, I am the creator and the main contributor to an organization with more than 8k stars, but I have just 51 stars, it makes me feel terrible. Besides, the API didn't count the archived repo, e.g. elliottzheng/copytranslator
ReadMe Card

Elliott Zheng's GitHub stats

ReadMe Card

@anuraghazra
Copy link
Owner

@elliottzheng Forked and organization stars are not counted as personal star counts. it'll only show stars from repos which you directly own.

related to #1

rahulrachh pushed a commit to rahulrachh/github-readme-stats that referenced this issue Jul 16, 2020
* improve: improved rating algorithm wip

* Fixed typos, punctuation [...]

Corrected many instances of "Github" to "GitHub", fixed the punctuation on some sections, fixed the ~lack of~ uppercase chars in others, tweaked the grammar a bit, and added the Vercel guide to a spoiler-ish section so it's only visible if you click to expand.

<3

* fix: github rate limiter with multiple PATs

* perf: vertically align text left

* refactor: refactored retryer logic & handled invalid tokens

* chore: remove redundant codes

`axios` is Promise based, there is no need to wrap it into a Promise constructor again

* fix: query param booleans

* design: fixed rank alignment

* chore: rebase from master

* fix: fixed repo card breaking in absence of primaryLanguage

* fix: fixed stars count anuraghazra#39 & fixed progressbar percentage

* perf: replace emoji icons with GitHub SVG icons

* chore: added funding link

* refactor: refacted icons to another file

* test: added test for icons

Co-authored-by: anuraghazra <[email protected]>
Co-authored-by: Micael Jarniac <[email protected]>
Co-authored-by: JounQin <[email protected]>
@sayantani11
Copy link

I am still facing the issue. Although I have 8 starred repo, it shows 2

@anuraghazra
Copy link
Owner

anuraghazra commented Sep 5, 2021

I am still facing the issue. Although I have 8 starred repo, it shows 2

#39 (comment)

As i said in this comment that what github-readme-stats shows is "how many stars you've gained in your repos" and what github shows is "how many repos you've starred" they are not the same.

@yashu1wwww
Copy link

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

5 participants