{"id":19020140,"url":"https://github.com/gayanvoice/top-github-users-action","last_synced_at":"2025-08-19T18:45:21.468Z","repository":{"id":40416385,"uuid":"373376349","full_name":"gayanvoice/top-github-users-action","owner":"gayanvoice","description":"Check your ranking in GitHub","archived":false,"fork":false,"pushed_at":"2024-05-29T14:17:45.000Z","size":2725,"stargazers_count":142,"open_issues_count":18,"forks_count":41,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-08-16T01:18:59.071Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/gayanvoice/top-github-users","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gayanvoice.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-03T04:05:28.000Z","updated_at":"2025-07-30T20:08:11.000Z","dependencies_parsed_at":"2024-06-18T21:12:34.556Z","dependency_job_id":"7daa8a8d-662d-4b15-8e76-86eead677c23","html_url":"https://github.com/gayanvoice/top-github-users-action","commit_stats":{"total_commits":95,"total_committers":3,"mean_commits":"31.666666666666668","dds":0.6,"last_synced_commit":"78307639b79c7273fc4018c0f059155c64e49248"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gayanvoice/top-github-users-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gayanvoice%2Ftop-github-users-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gayanvoice%2Ftop-github-users-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gayanvoice%2Ftop-github-users-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gayanvoice%2Ftop-github-users-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gayanvoice","download_url":"https://codeload.github.com/gayanvoice/top-github-users-action/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gayanvoice%2Ftop-github-users-action/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270670085,"owners_count":24625449,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T20:15:52.966Z","updated_at":"2025-08-19T18:45:21.434Z","avatar_url":"https://github.com/gayanvoice.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Top GitHub Users Action \u003cimg src=\"https://github.githubassets.com/images/modules/site/features/actions-icon-actions.svg\" height=48 width=48 /\u003e [\u003cimg alt=\"Image of my-profile-views-counter\" src=\"https://github.com/gayanvoice/my-profile-views-counter/blob/master/graph/373376349/small/week.png\" height=\"20\"\u003e](https://github.com/gayanvoice/my-profile-views-counter/blob/master/readme/373376349/week.md)\n[![Image of my-profile-views-counter](https://github.com/gayanvoice/my-profile-views-counter/blob/master/svg/373376349/badge.svg)](https://github.com/gayanvoice/my-profile-views-counter/blob/master/readme/373376349/week.md)\n\nCheck your rank in GitHub! Get the list of active users in GitHub by country using GitHub Graph API. Go to [gayanvoice/top-github-users](https://github.com/gayanvoice/top-github-users).\n\n### How it works?\nThe list of countries and the cities are sorted in [config.json](https://github.com/gayanvoice/top-github-users/blob/main/config.json) as an array. The [octokit/graphql.js](https://www.npmjs.com/package/@octokit/graphql) fetches the data from GitHub Graph API. After the fetch is completed, it creates a JSON file by country name in [./cache](https://github.com/gayanvoice/top-github-users/tree/main/cache). The [checkpoint.json](https://github.com/gayanvoice/top-github-users/blob/main/checkpoint.json) is used to checkpoint the country.\n\nThe action gets the list of users and order it by public contributions, total contributions, and number of followers from cache to generate markdowns, and ranking. The [./docs](https://github.com/gayanvoice/top-github-users/tree/main/docs) contains the rankings of total public contirubtions by country.\n\n\u003ctable\u003e\n\t\u003ctr\u003e\n\t\t\u003ctd\u003e\n\t\t\tDon't forget to star ⭐ this repository\n\t\t\u003c/td\u003e\n\t\u003c/tr\u003e\n\u003c/table\u003e\n\n## Technologies\n\n\u003ctable\u003e\n\t\u003ctr\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ca href=\"https://www.w3schools.com/js/\"\u003e\n\t\t\t\t\u003cimg src=\"https://upload.wikimedia.org/wikipedia/commons/9/99/Unofficial_JavaScript_logo_2.svg\" height=96 width=96 /\u003e\n\t\t\t\u003c/a\u003e\n\t\t\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ca href=\"https://github.com/features/actions\"\u003e\n\t\t\t\t\u003cimg src=\"https://github.githubassets.com/images/modules/site/features/actions-icon-actions.svg\" height=96 width=96 /\u003e\n\t\t\t\u003c/a\u003e\n\t\t\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ca href=\"https://nodejs.org/en/\"\u003e\n\t\t\t\t\u003cimg src=\"https://nodejs.org/static/images/logos/nodejs-new-pantone-white.svg\" height=96 width=96 /\u003e\n\t\t\t\u003c/a\u003e\n\t\t\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ca href=\"https://docs.github.com/en/graphql\"\u003e\n\t\t\t\t\u003cimg src=\"https://upload.wikimedia.org/wikipedia/commons/1/17/GraphQL_Logo.svg\" height=96 width=96 /\u003e\n\t\t\t\u003c/a\u003e\n\t\t\u003c/td\u003e\n\t\t\u003ctd\u003e\n\t\t\t\u003ca href=\"https://github.com/\"\u003e\n\t\t\t\t\u003cimg src=\"https://upload.wikimedia.org/wikipedia/commons/9/91/Octicons-mark-github.svg\" height=96 width=96 /\u003e\n\t\t\t\u003c/a\u003e\n\t\t\u003c/td\u003e\n\t\u003c/tr\u003e\n\u003c/table\u003e\n\n## Setup\n\n**1 —** Create an empty repository and name the repository as `top-github-users`.\n\n**2 —** 🔒 Create a new personal access token with `repo` `workflow` `admin:org` `user` options\n\nGo to Settings -\u003e Developer settings -\u003e Personal Access Tokens and click on *Generate new token* button. Give it any name and select `repo` `workflow` `admin:org -\u003e read:org` `user -\u003e read:user` options and click on *Generate token* button. ✂️ Copy the token.\n\n**3 —** 🔑 Create a repository secret\n\nGo to your top-github-users repository -\u003e Settings -\u003e Secrets and click on *New repository secret* button and enter *name* as `CUSTOM_TOKEN` and 📋 paste the `personal access token` under *value*. Click on *Add secret* button.\n\n**4 —** Go to your top-github-users repository -\u003e Actions and click on *set up a workflow yourself* link to create a new workflow and paste the below content into yml file. Commit changes.\n\n```yml\nname: Top GitHub Users\non:\n  schedule:\n    - cron: '0 * * * *'\n  workflow_dispatch:\njobs:\n  release:\n    name: GitHub Active Users\n    runs-on: ubuntu-20.04\n    steps:\n      - uses: actions/checkout@v2.3.4\n        with:\n          ref: ${{ github.head_ref }}\n          token: ${{ secrets.CUSTOM_TOKEN }}\n      - uses: actions/setup-node@v2.1.5\n        with:\n          node-version: 14.17.0\n      - uses: gayanvoice/top-github-users-action@master\n        env:\n          CUSTOM_TOKEN: ${{ secrets.CUSTOM_TOKEN }}\n\n```\n**5 —** Go to your top-github-users repository. Create a JSON file *checkpoint.json*. Copy the content and paste to the checkpoint.json and commit changes.\n\n```json\n{\"checkpoint\":0}\n```\n**6 —** Go to your top-github-users repository. Create a JSON file *config.json*. Copy the content and paste to the config.json and commit changes.\n\n```json\n{\n  \"devMode\": \"false\",\n  \"locations\":[\n    { \"country\":  \"afghanistan\", \"geoName\": \"Afghanistan\", \"cities\": [\"kabul\", \"kandahar\", \"herat\", \"Kunduz\", \"lashkargah\", \"ghazni\", \"khost\", \"zaranj\"], \"imageUrl\": \"https://upload.wikimedia.org/wikipedia/commons/9/9a/Flag_of_Afghanistan.svg\" },\n    { \"country\":  \"albania\", \"geoName\": \"Albania\", \"cities\": [\"tirana\", \"durrës\", \"vlorë\", \"elbasan\", \"shkodër\", \"kamëz\", \"fier\", \"korçë\"], \"imageUrl\": \"https://upload.wikimedia.org/wikipedia/commons/3/36/Flag_of_Albania.svg\" },\n    { \"country\":  \"algeria\", \"geoName\": \"Algeria\", \"cities\": [\"algiers\", \"oran\", \"constantine\", \"batna\", \"djelfa\", \"sétif\", \"annaba\", \"sidibelabbès\", \"biskra\", \"tiaret\"], \"imageUrl\": \"https://upload.wikimedia.org/wikipedia/commons/7/77/Flag_of_Algeria.svg\" },\n    { \"country\":  \"andorra\", \"geoName\": \"Andorra\", \"cities\": [\"andorra-la-vella\", \"santa-coloma\", \"la-margineda\", \"engolasters\"], \"imageUrl\": \"https://upload.wikimedia.org/wikipedia/commons/1/19/Flag_of_Andorra.svg\" },\n    { \"country\":  \"angola\", \"geoName\": \"Angola\", \"cities\": [\"luanda\", \"cabinda \", \"huambo\", \"lubango \", \"kuito\", \"malanje \", \"lobito\", \"benguela\"], \"imageUrl\": \"https://upload.wikimedia.org/wikipedia/commons/9/9d/Flag_of_Angola.svg\" },\n    { \"country\":  \"argentina\",\"geoName\": \"Argentina\", \"cities\": [\"buenos-aires\", \"cordoba\", \"rosario\", \"la-plata\", \"tucumán\", \"mar-del-plata\", \"salta\", \"santa-fe\"], \"imageUrl\": \"https://upload.wikimedia.org/wikipedia/commons/1/1a/Flag_of_Argentina.svg\" },\n    { \"country\":  \"armenia\", \"geoName\": \"Armenia\", \"cities\": [\"yerevan\", \"gyumri\", \"vanadzor\", \"vagharshapat\", \"abovyan \"], \"imageUrl\": \"https://upload.wikimedia.org/wikipedia/commons/2/2f/Flag_of_Armenia.svg\" },\n    { \"country\":  \"australia\", \"geoName\": \"Australia\", \"cities\": [\"sydney\", \"melbourne\", \"perth\", \"adelaide\", \"brisbane\", \"canberra\", \"hobart\", \"gold-coast\", \"darwin\"], \"imageUrl\": \"https://upload.wikimedia.org/wikipedia/commons/8/88/Flag_of_Australia_%28converted%29.svg\" },\n    { \"country\":  \"austria\", \"geoName\": \"Austria\", \"cities\": [\"vienna\", \"salzburg\", \"innsbruck\", \"linz\", \"graz\", \"klagenfurt\", \"bregenz\", \"villach\"], \"imageUrl\": \"https://upload.wikimedia.org/wikipedia/commons/4/41/Flag_of_Austria.svg\" }\n  ]\n}\n```\n**7 —** 📄 Go to your top-github-users repository -\u003e Actions. Select the workflow *Top GitHub Users* and click on `Run workflow` button.\n\n## Deploy local\n**1 —** Clone this repository to your computer.\n\n**2 —** Edit *index.js*\n📋 paste the `personal access token` in `AUTH_KEY` in https://github.com/gayanvoice/top-github-users-action/blob/master/src/index.js and comment *process.env* secrets.\n```javascript\n    const AUTH_KEY = \"ghp_vbmFdybMFCxWzvrgC*************\";\n    const GITHUB_USERNAME_AND_REPOSITORY = 'gayanvoice/top-github-users';\n    // const AUTH_KEY = process.env.CUSTOM_TOKEN;\n    // const GITHUB_USERNAME_AND_REPOSITORY = process.env.GITHUB_REPOSITORY;\n```\n**3 —** Run `test`\nRun on command line.\n```shell\nnpm test\n```\n## 📦 Third party\n- [@octokit/graphql](https://www.npmjs.com/package/@octokit/graphql) - Send GraphQL requests to GitHub API.\n- [fs-extra](https://www.npmjs.com/package/fs-extra) - Creating directories and files.\n- [simple-git](https://www.npmjs.com/package/simple-git) - Handling Git commands.\n## 📄 License\n- GitHub Action - [gayanvoice/top-github-users-action](https://github.com/gayanvoice/top-github-users-action)\n- Repository - [gayanvoice/top-github-users](https://github.com/gayanvoice/top-github-users)\n- Data in the `./cache` directory - [Open Database License](https://opendatacommons.org/licenses/odbl/1-0/)\n- Code - [MIT](./LICENSE) © [Gayan Kuruppu](https://github.com/gayanvoice)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgayanvoice%2Ftop-github-users-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgayanvoice%2Ftop-github-users-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgayanvoice%2Ftop-github-users-action/lists"}