Production-ready Node.js (ESM) tool that fetches every repository in a GitHub organization via GraphQL pagination, aggregates metrics, and writes a beautiful organization profile README to profile/README.md.
Designed for RawatLabsAR and reusable by any organization.
- GraphQL-first fetching with full pagination (thousands of repos)
- Automatic retries, exponential backoff, and rate-limit handling
- Continues on per-repository failures — never ships a malformed README
- Repository categorization (topics → name conventions → language)
- Activity status: Active / Slow / Inactive / Archived
- Shields.io badges, tables, emojis, collapsible sections
- Mermaid language pie chart & activity chart
- Leaderboards (issues, PRs, contributors), topic cloud, license summary, disk usage, health scores
- Nightly GitHub Action + manual
workflow_dispatch
.github/
├── profile/
│ └── README.md # Generated org profile README
├── scripts/
│ ├── generate-readme.js # Entrypoint
│ ├── github.js # GraphQL + REST client
│ ├── markdown.js # README renderer
│ ├── config.js # Env + category rules
│ └── utils.js # Helpers, cache, scoring
├── screenshots/ # Example captures for docs
├── .github/workflows/
│ └── update-dashboard.yml # Nightly + manual update
├── package.json
├── .env.example
├── .gitignore
├── LICENSE
└── README.md
Add captures under screenshots/ after your first successful run:
| Preview | Section |
|---|---|
screenshots/dashboard-header.png |
Header & badges |
screenshots/statistics.png |
Org statistics |
screenshots/language-chart.png |
Mermaid charts |
screenshots/repository-table.png |
Repo table |
Classic token (Settings → Developer settings → Personal access tokens):
| Scope | Why |
|---|---|
repo |
Read private repos (use public_repo if the org is public-only) |
read:org |
List organization repositories & metadata |
Fine-grained token alternative:
- Resource owner:
RawatLabsAR - Repository access: All repositories (or selected)
- Permissions: Contents: Read, Metadata: Read
- Organization: Members: Read
For GitHub Actions (org or repo secrets):
- Open
https://github.com/RawatLabsAR/.github/settings/secrets/actions - Create secret
ORG_TOKENwith your PAT value - Ensure the workflow can write to the repo (
contents: writeis already set)
For local runs:
cp .env.example .env
# Edit .env — set GITHUB_TOKEN and ORG_NAME
export $(grep -v '^#' .env | xargs)# Requires Node.js 22+
npm install
npm run generateOutput: profile/README.md
- Go to Actions → Update Organization Dashboard
- Click Run workflow
- Or wait for the nightly schedule (
0 0 * * *UTC)
The action installs dependencies, runs the generator, and commits profile/README.md.
GitHub renders the org profile from a special repository:
- Ensure the repo is named
.githubunder the organizationRawatLabsAR - Ensure the generated file is at
profile/README.md(case-sensitive on some systems) - Push to the default branch
- Visit
https://github.com/RawatLabsAR— the profile README appears under the org header
The org must be a GitHub Organization (not a personal user) for
profile/README.mdto display.
| Variable | Required | Default | Description |
|---|---|---|---|
ORG_NAME |
Yes | RawatLabsAR |
Organization login |
GITHUB_TOKEN |
Yes | — | PAT / Actions token (ORG_TOKEN secret in CI) |
OUTPUT_PATH |
No | profile/README.md |
Write path relative to repo root |
- Organization header & badges
- Organization statistics
- Repository categories
- Featured repositories (health score)
- Recently updated / top starred
- Latest releases & recently created
- Language distribution (table + Mermaid pie)
- Activity chart
- Repository health
- Leaderboards (issues, PRs, contributors)
- Disk usage & license summary
- Topic cloud
- Full repository table (status column)
- Quick links & generated timestamp
| Status | Rule |
|---|---|
| 🟢 Active | Pushed within 30 days |
| 🟡 Slow | Pushed within 90 days |
| 🔴 Inactive | No push in 90+ days |
| 📦 Archived | Repository archived |
| Command | Description |
|---|---|
npm run generate |
Fetch org data and write profile/README.md |
npm start |
Alias for generate |
- Primary: GitHub GraphQL with cursor pagination (
pageSize=50) - Enrichment: REST contributor counts (
per_page=1+Linkheader) with concurrency limits - Resilience: Retries with backoff, rate-limit pauses, per-repo error isolation, in-memory TTL cache
MIT © RawatLabsAR