gh-triage
v0.1.0
Published
Fetch GitHub issues + timelines and explore them in a triage dashboard.
Readme
gh-triage
Fetch GitHub issues + their full timelines, then explore them in a triage dashboard with sorting, search, and per-issue activity charts.
Install
npm install -g gh-triage
# or run ad-hoc:
npx gh-triage --helpUsage
1. Fetch a repo's issues
# pass via flag, env var, or a .env file in the cwd (loaded automatically)
export GITHUB_TOKEN=ghp_xxx
# or: echo "GITHUB_TOKEN=ghp_xxx" > .env
gh-triage fetch microsoft/playwright --out ./pw-data
gh-triage fetch facebook/react --zip react-issues.zipWrites:
<out>/issues.json— search-result list of issues<out>/nodes/XX/<n>.json— full issue node per number<out>/timeline/XX/<n>.json— full timeline (comments, labels, references…)
Already-fetched issues are skipped unless you pass --force.
Options:
| Flag | Description |
|---|---|
| --out <dir> | output directory (default: ./data) |
| --zip <file> | also produce a zip archive |
| --token <tok> | GitHub token (or set GITHUB_TOKEN) |
| --state <s> | open | closed | all (default open) |
| --filter <q> | extra search qualifiers, e.g. "label:bug -label:wontfix" |
| --force | re-fetch issues already on disk |
| --concurrency N | parallel fetches (default 4) |
2. View the dashboard
gh-triage view ./pw-data # serve a folder
gh-triage view react-issues.zip # serve a zip directly
gh-triage view # default: ./data, falls back to drop-zone UI| Flag | Description |
|---|---|
| --port <p> | listen port (default 3456) |
| --host <h> | bind host (default 127.0.0.1) |
| --no-open | don't open the browser |
The dashboard mimics GitHub's issue list. You can sort by:
- Newest / Recently updated
- Most positive reactions (across the issue and every comment)
- Most negative reactions
- Most users involved
Click any issue to see:
- Description, labels, link to GitHub
- An activity timeline chart — stacked-bar histogram of every event (commented, labeled, cross-referenced, closed…) over the issue's lifetime
- A pattern label: Forgotten, Quiet, Sustained, Hot, or Active, inferred from event cadence and recency
- A flat event log with users, labels, cross-references, renames…
The viewer is fully client-side, so the same UI also accepts a drag-and-dropped
zip — useful for sharing snapshots without re-running fetch.
Development
git clone <this repo>
cd gh-triage
npm install
npm run build # builds CLI (tsc) + UI (vite)
npm run dev # vite dev server, reads ./data (or $GH_TRIAGE_DATA)
node bin/gh-triage.js view ./dataLayout:
src/cli/ CLI entry, fetch + view commands
src/ui/ React dashboard (no-backend, just /data/* fetches)
bin/ npm bin shim
dist/ build output (gitignored, shipped to npm)Data shape
<out>/
issues.json # issues from search API (light)
nodes/<XX>/<n>.json # full issue payload
timeline/<XX>/<n>.json # array of timeline events<XX> is the first two digits of the zero-padded issue number. The dashboard
derives all sort keys client-side from these files.
