brunobritodev / awesome-github-stats

🚀 Show everyone how amazing you are! Stay motivated and display your total contributions and level on your GitHub profile README
https://awesome-github-stats.azurewebsites.net/
MIT License
209 stars 22 forks source link

Wrong number of stars count #18

Closed rilysh closed 2 years ago

rilysh commented 2 years ago

Describe the bug When I put my username and submit it, it shows 82k+ number of stars count which I haven't in reality.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://awesome-github-stats.azurewebsites.net/
  2. Put your username and click on submit
  3. See the results

Expected behavior It should specify correct number of stars count. Screenshots Screenshot_20220712-182705_Vivaldi Browser

Desktop (please complete the following information):

brunobritodev commented 2 years ago

Yours stars is a collection of all projects you have contributed for. Not only your personals stars.

There is a rank method to give your "xp", which give different score for personal stars and stars from the projects you have contributed.

Base query to get stars of your contributions:

            query userInfo($login: String!) {
                user(login: $login) {
                    contributionsCollection(from: "2022-01-01T00:00:00Z", to: "2023-01-01T00:00:00Z") {
                        totalCommitContributions
                        totalRepositoryContributions
                        restrictedContributionsCount
                        pullRequestContributionsByRepository{
                          contributions{
                            totalCount
                          }
                          repository {
                            nameWithOwner
                            stargazerCount
                          }
                        }
                        commitContributionsByRepository{
                          contributions {
                            totalCount
                          }
                          repository{
                            nameWithOwner
                            stargazerCount
                          }
                        }
                    }
                }
            }