teoxoy / profile-readme-stats

Showcase your github stats on your profile README.md
https://github.com/marketplace/actions/profile-readme-stats
MIT License
245 stars 85 forks source link

Commits and Pull requests number decreased #22

Closed avidraghav closed 1 year ago

avidraghav commented 1 year ago

My Commits and Pull Requests were decreased by the github action, how can I fix this?

Screenshot 2023-03-01 at 7 18 45 PM
teoxoy commented 1 year ago

Did you make one of your repos private?

avidraghav commented 1 year ago

No, I didn't. I clearly remember that I didn't make any repo private in which I made around 200 commits.

avidraghav commented 1 year ago

Any Solution to the above problem? I can provide additional data you want. I'm afraid that I'll have to stop using the action if this issue isn't resolved.

teoxoy commented 1 year ago

It's difficult to know what happened. You could try running the GraphQL queries this action runs manually and checking their results. This might be an issue with the results github's GraphQL API returns.

avidraghav commented 1 year ago

I see, can u send the sample query with other instructions? I'm not well versed with GraphQL

teoxoy commented 1 year ago

Try to run the query below here: https://docs.github.com/en/graphql/overview/explorer

query { 
  viewer { 
    repositoriesContributedTo(first: 10) {
      nodes {
        nameWithOwner
      }
      totalCount
    }
  }
}

and see if there are any noteworthy public repos that you contributed to missing.

I suspect one of them where you contributed ~200 commits is missing (either became private or got deleted).

avidraghav commented 1 year ago

I ran the query and none of the repositories it returned got deleted.

Screenshot 2023-03-04 at 6 10 33 PM
teoxoy commented 1 year ago

I mean, there must be one that's missing. Count went from 4 to 3 (it's 5 now because you recently contributed to this repo and one more)

avidraghav commented 1 year ago

I try running this https://github-readme-stats.vercel.app/api?username=avidraghav&count_private=true&include_all_commits=true It's showing the perfect commit count. If I had made a repo private then that would have reflected here too.

teoxoy commented 1 year ago

image

This is what I see there.

image

And this is on your profile generated by this action.

The only stat that is way off is the nr of total commits.

image

In this image (first one you posted) the nr of PRs also went down and is the same as the one reported by https://github.com/anuraghazra/github-readme-stats

avidraghav commented 1 year ago

I see, i guess I lost access to a repository in which I made 200 or so commits. Can u mention any steps which I can take in future so that if I am contributing to a repository whose access I can/will lose but my contribution stats won't become zero for the same.

teoxoy commented 1 year ago

I don't think there is any way to do that unless you keep a record/history of all the queries the GraphQL API returned.

avidraghav commented 1 year ago

It's strange I guess, If I'm using this query than I'm getting the commits from the repository which I lost access to. The PR count has decreased but the commit count is same. The query params I have added are just for formatting sakes. https://github-readme-stats.vercel.app/api?username=avidraghav&count_private=true&include_all_commits=true&show_icons=true&show_icons=true&title_color=ffffff&icon_color=bb2acf&text_color=daf7dc&bg_color=151515