Github-readme-stats: Star Count Issue?

Created on 13 Jul 2020  路  17Comments  路  Source: anuraghazra/github-readme-stats

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

image

All 17 comments

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.

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,

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

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

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

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
        }
      }
    }

That seems logical.

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

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

although you still got S+ rank :smile:

I think the ranking algorithm needs to be improved.

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?

Its a new feature, just deployed few mins ago.

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

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

Thanks for tackling this!

Edit: Confirming fix deployed 馃榾
image

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

@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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Math-O5 picture Math-O5  路  5Comments

deep5050 picture deep5050  路  3Comments

anuraghazra picture anuraghazra  路  5Comments

JoseDeFreitas picture JoseDeFreitas  路  7Comments

thisispratt picture thisispratt  路  4Comments