This CLI tool queries the GitHub GraphQL API for users and ranks them according to number of contributions. Several preset locations are provided.
GitHub Token
In order to make requests against the GitHub API one needs an access token, which can be created here. The token needs read:org
and read:user
permissions.
Example usage (dev environment):
go run *.go \
--token paste-your-token-here \
--preset worldwide \
--amount 500 \
--consider 1000 \
--output csv \
--file ./output.csv
Contributions are accepted. Please report issues or make pull requests against either master
or branch for the website as appropriate.
Please use the provided precommit hooks and run go fmt
, go vet
and go lint
liberally.
The original project by @lauripiispanen seems to have been archived. I also thought that top-github.eplus.dev
was a more appropriate domain name and quickly grabbed it 😀
This could be due to a number of things.
-
Firstly, GitHub API doesn't allow sorting by contributions, so instead it is first sorted by number of followers to get a larger list, which is then sorted by contributions. This means you need a minimum number of followers to be on this list. Each page shows the minimum number of followers needed.
-
You live in a city which is not included in the query. Unfortunately the query is free-text and not strictly geographical. Rural areas may be excluded from the list, but you can often remedy this by adding the country name to your location in GitHub.
-
You have mostly private commits. These are included too, but they are not listed on the main country page anymore. Instead you will find a subpage with a list that also has private contributions included. This arrangement is done to favor open source contributions over private contributions.
Depending on your settings, your GitHub profile displays either only your public contributions or both your public and private ones. commits.top by default shows only public contributions, but public+private count is accessible on a subpage on each region page. You can use the GitHub API GraphQL Explorer and run the following query to see what the API returns for your user:
query {
viewer {
login
contributionsCollection {
restrictedContributionsCount
contributionCalendar {
totalContributions
}
}
}
}