Skip to content

Repository files navigation

GitHub Organization Dashboard Generator

Update Dashboard Node.js License: MIT Org

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.


Features

  • 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

Project Structure

.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

Screenshots

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

Quick Start

1. Create a GitHub PAT

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

2. Configure secrets

For GitHub Actions (org or repo secrets):

  1. Open https://github.com/RawatLabsAR/.github/settings/secrets/actions
  2. Create secret ORG_TOKEN with your PAT value
  3. Ensure the workflow can write to the repo (contents: write is already set)

For local runs:

cp .env.example .env
# Edit .env — set GITHUB_TOKEN and ORG_NAME
export $(grep -v '^#' .env | xargs)

3. Run locally

# Requires Node.js 22+
npm install
npm run generate

Output: profile/README.md

4. Run the GitHub Action

  1. Go to ActionsUpdate Organization Dashboard
  2. Click Run workflow
  3. Or wait for the nightly schedule (0 0 * * * UTC)

The action installs dependencies, runs the generator, and commits profile/README.md.

5. Publish to the organization profile

GitHub renders the org profile from a special repository:

  1. Ensure the repo is named .github under the organization RawatLabsAR
  2. Ensure the generated file is at profile/README.md (case-sensitive on some systems)
  3. Push to the default branch
  4. 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.md to display.


Configuration

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

Generated README Sections

  1. Organization header & badges
  2. Organization statistics
  3. Repository categories
  4. Featured repositories (health score)
  5. Recently updated / top starred
  6. Latest releases & recently created
  7. Language distribution (table + Mermaid pie)
  8. Activity chart
  9. Repository health
  10. Leaderboards (issues, PRs, contributors)
  11. Disk usage & license summary
  12. Topic cloud
  13. Full repository table (status column)
  14. Quick links & generated timestamp

Status Legend

Status Rule
🟢 Active Pushed within 30 days
🟡 Slow Pushed within 90 days
🔴 Inactive No push in 90+ days
📦 Archived Repository archived

Scripts

Command Description
npm run generate Fetch org data and write profile/README.md
npm start Alias for generate

API Strategy

  • Primary: GitHub GraphQL with cursor pagination (pageSize=50)
  • Enrichment: REST contributor counts (per_page=1 + Link header) with concurrency limits
  • Resilience: Retries with backoff, rate-limit pauses, per-repo error isolation, in-memory TTL cache

License

MIT © RawatLabsAR

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages