No description
  • TypeScript 34.9%
  • CSS 30.8%
  • Astro 28.1%
  • Python 3.2%
  • JavaScript 3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Yuri 49e2f6a287
Some checks failed
Rankings / collect (push) Has been cancelled
Rankings / deploy (push) Has been cancelled
Rankings / build (push) Has been cancelled
docs: require the GitHub Actions Pages source and fix the checkpoint note
The branch-based Pages source spawns a second pipeline that races the
workflow and can publish branch contents over the site, so the setup
must use the GitHub Actions source. The failure-handling note now
matches the restart-at-first-failure checkpoint behavior.

Co-authored-by: Ella Mizuki <[email protected]>
2026-10-27 18:21:16 -03:00
.github/workflows ci: replace the legacy collector workflow with a scoped pipeline 2026-10-25 08:17:57 -03:00
data chore(data): refresh rankings for 2026-10-27 2026-10-27 17:01:48 +00:00
docs docs: require the GitHub Actions Pages source and fix the checkpoint note 2026-10-27 18:21:16 -03:00
pipeline fix(data): correct country display names and city whitespace 2026-10-25 14:21:58 -03:00
site feat(site): build the rankings site with YuTheme v2 2026-10-25 08:17:35 -03:00
.gitignore chore: add workspace scaffold and license 2026-10-25 03:26:40 -03:00
config.json fix(data): correct country display names and city whitespace 2026-10-25 14:21:58 -03:00
eslint.config.js feat(pipeline): collect rankings through the GitHub GraphQL API 2026-10-25 04:24:23 -03:00
LICENSE chore: add workspace scaffold and license 2026-10-25 03:26:40 -03:00
package.json chore: scaffold pnpm workspace with Astro site and pipeline package 2026-10-25 03:30:32 -03:00
pnpm-lock.yaml chore: scaffold pnpm workspace with Astro site and pipeline package 2026-10-25 03:30:32 -03:00
pnpm-workspace.yaml chore: scaffold pnpm workspace with Astro site and pipeline package 2026-10-25 03:30:32 -03:00
README.md docs: align project documentation with the implemented behavior 2026-10-25 08:17:57 -03:00

Top GitHub Users

Live rankings of the most followed and most active GitHub users per country, built on the official GitHub GraphQL API and refreshed through hourly country batches. The site lives at isyuricunha.github.io/top-github-users.

The dataset currently covers 138 countries and 677 configured city query entries with 122,799 country-ranking entries. The global total sums country-ranking entries, not distinct GitHub accounts, because the same profile can match more than one country's location queries.

What is ranked

For each country the pipeline tracks users whose profile location matches the country or one of its listed cities in config.json, ordered by followers. New collections cap the result at 500 users per country; existing snapshots may contain more. Each tracked user carries three metrics:

Metric Definition
Followers followers.totalCount
Total contributions contribution calendar total for the last year, public plus private
Public contributions calendar total minus the restricted (private) count

Each country page presents the profiles in its snapshot ordered three ways: by followers, by public contributions, and by total contributions. Raw snapshots are served as JSON at /data/{country}.json on the site, for example /data/brazil.json, and the definitions come straight from the GitHub GraphQL API documentation.

How it works

  • pipeline/ is a dependency-free TypeScript collector. Per country it runs a light user search ordered by followers (the sort:followers-desc qualifier inside the search query string), then fetches contribution counts through nodes() lookups in small batches, because the API rejects heavy contribution fields on full search pages.
  • An hourly scheduled workflow collects a round-robin batch of six countries per run using only the repository's built-in GITHUB_TOKEN, subject to the official GraphQL rate limits. It commits the collected batch and checkpoint, then deploys the site.
  • data/current/ holds one canonical snapshot per country, data/history/ one summary line per collection day, and data/meta.json the round-robin checkpoint. Every successful batch refreshes the collected snapshots and checkpoint metadata, even when ranking values stay the same. Only the batch's country files and metadata change, not every country file.
  • site/ is a static Astro 7 site that renders every country page at build time. No client framework or analytics scripts; profile avatars load from GitHub's CDN.

The collection cadence, API budget math and data contract are documented in docs/ARCHITECTURE.md.

Development

Requires Node 24 LTS and pnpm 12.

pnpm install                # workspace install
pnpm lint                   # ESLint 10 across pipeline and site
pnpm --filter @top-github-users/pipeline typecheck
pnpm --filter @top-github-users/pipeline test
pnpm site:build             # builds site/dist (local preview via pnpm --filter @top-github-users/site preview)

The CLI caps manual round-robin batches at six countries, matching the scheduled workload budget. The workflow’s dry_run input queries data without writing snapshots, committing, building or deploying the site. For local collection, set GITHUB_TOKEN to a token with public read access:

export GITHUB_TOKEN='<read-only-token>'
node pipeline/src/cli.ts collect --country brazil          # single country
node pipeline/src/cli.ts collect --countries 6             # round-robin batch
node pipeline/src/cli.ts collect --country brazil --dry-run

History

The initial migrated snapshots retain their country-specific collection dates, ranging from October 6, 2025 through January 28, 2026. January 28 is the newest seed date; each country has its own timestamp.

License

AGPL-3.0. Data comes from public GitHub profiles through the public GitHub API.