Skip to content

Commit d099d24

Browse files
committed
docs: trim README to testing instructions
1 parent 7b823cf commit d099d24

1 file changed

Lines changed: 5 additions & 74 deletions

File tree

.github/dashboard/README.md

Lines changed: 5 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,18 @@
11
# GitHub Dashboard
22

3-
Config-driven static dashboard for tracking issues, PRs, and CI health. Auto-deployed to GitHub Pages via Actions.
4-
5-
## Quick Start
3+
## Local Preview
64

75
```bash
86
cd .github/dashboard
97
npm install
10-
npx tsx src/generate.ts # fetches live data, outputs to site/
11-
npx serve site -l 8901 # preview at http://localhost:8901
12-
```
13-
14-
## Project Structure
15-
16-
```
17-
src/
18-
config.ts ← declarative dashboard config (pages, sections, metrics)
19-
types.ts ← all TypeScript types
20-
github.ts ← GitHub API client (REST + GraphQL)
21-
compute.ts ← transforms raw data → chart-ready data
22-
render.ts ← generates HTML with Chart.js
23-
generate.ts ← entry point: fetch → compute → render → write
24-
site/ ← generated output (gitignored)
25-
```
26-
27-
## Adding a Section
28-
29-
Edit `src/config.ts`. Each page has a `sections` array. Available section types:
30-
31-
| Type | Description | Key fields |
32-
| --------------- | ----------------------------------- | -------------------------------- |
33-
| `stats` | Stat cards with time windows | `metrics`, `windows` |
34-
| `timeline` | Weekly bar chart + cumulative line | `series` |
35-
| `distribution` | Doughnut or bar chart | `field`, `chart` |
36-
| `histogram` | Bucketed bar chart | `field`, `buckets`, `groupBy` |
37-
| `table` | Filtered/sorted table | `filter`, `columns`, `limit` |
38-
| `termFrequency` | Word frequency from titles | `field`, `filter`, `minCount` |
39-
| `ci` | CI pass rates, failures, flaky jobs | `workflows`, `branch`, `maxRuns` |
40-
41-
Example — add a new chart to the PRs page:
42-
43-
```typescript
44-
{ type: "distribution", field: "author", chart: "bar", orientation: "horizontal" },
45-
```
46-
47-
## Adding a Page
48-
49-
Add an entry to `config.pages` in `src/config.ts`:
50-
51-
```typescript
52-
{
53-
id: "my-page",
54-
title: "My Page",
55-
dataSource: "issues", // "issues" | "prs" | "ci"
56-
sections: [ ... ],
57-
}
8+
npx tsx src/generate.ts
9+
npx serve site -l 8901
5810
```
5911

60-
Navigation links are generated automatically.
12+
For faster iteration, set `maxRuns: 10` in the CI section of `src/config.ts` — full CI fetch takes ~90s.
6113

62-
## Development Workflow
14+
## Type Check
6315

6416
```bash
65-
# Type check
6617
npx tsc --noEmit
67-
68-
# Generate with reduced CI data (faster iteration)
69-
# Set maxRuns to 10 in config.ts, then:
70-
npx tsx src/generate.ts
71-
72-
# Serve and preview
73-
npx serve site -l 8901
7418
```
75-
76-
Full generation takes ~90s (CI job fetching is the bottleneck). For faster iteration, set `maxRuns: 10` in the CI
77-
section config while developing.
78-
79-
## Deployment
80-
81-
Handled automatically by `.github/workflows/dashboard.yml`:
82-
83-
- Triggers on issue/PR events, daily at 6am UTC, or manual dispatch
84-
- Runs `npm ci && npx tsx src/generate.ts`
85-
- Deploys `site/` to GitHub Pages
86-
87-
To enable: Settings → Pages → Source → GitHub Actions.

0 commit comments

Comments
 (0)