Skip to content

Commit 66dbae2

Browse files
refactor: consolidate pipeline, auto-generate README, fix publishing
Pipeline: - Move health scores, trends, alerts INTO orchestrator (were separate workflow steps) - Fix duplicate manifest writes (3→2: preliminary + final) - Remove redundant unprotected readme-stats call - 403 rate-limit now falls through to Python fallback instead of hard fail README auto-generation: - update-readme-stats.ps1 rewritten (48→162 lines) to regenerate ALL marker sections - TRACKED_PROJECTS table, CONTRIBUTIONS_MERGED, CONTRIBUTIONS_OPEN now data-driven - Honest reframing: "across tracked ecosystem" instead of inflated claims CI/CD: - Add Pester test job to validate.yml - Fix publish-cli.yml: npmjs.org registry + NPM_TOKEN + --access public - Simplify evidence-daily.yml to single orchestrator call Docs: update ARCHITECTURE, DATA_MODEL, ROADMAP, CHANGELOG, CONTRIBUTING Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 1524ea4 commit 66dbae2

File tree

15 files changed

+295
-116
lines changed

15 files changed

+295
-116
lines changed

.github/workflows/evidence-daily.yml

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -22,33 +22,15 @@ jobs:
2222
git config user.name "dusan-maintains-bot"
2323
git config user.email "action@users.noreply.github.com"
2424
25-
- name: Update All Evidence
25+
- name: Full Refresh
2626
shell: pwsh
2727
env:
2828
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29-
run: |
30-
./scripts/update-all-evidence.ps1
31-
32-
- name: Compute Health Scores
33-
shell: pwsh
34-
run: |
35-
./scripts/compute-health-scores.ps1
36-
37-
- name: Compute Trends
38-
shell: pwsh
39-
run: |
40-
./scripts/compute-trends.ps1
41-
42-
- name: Check Alerts
43-
shell: pwsh
44-
env:
45-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46-
run: |
47-
./scripts/check-alerts.ps1
29+
run: ./scripts/update-all-evidence.ps1
4830

4931
- name: Commit and Push Changes
5032
run: |
51-
git add evidence/*.json evidence/*.md evidence/badges/*.svg README.md
33+
git add evidence/ README.md
5234
if git diff --cached --quiet; then
5335
echo "No changes to commit."
5436
exit 0

.github/workflows/publish-cli.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
name: Publish CLI to GitHub Packages
1+
name: Publish CLI to npm
22

33
on:
44
release:
55
types: [published]
66

77
permissions:
88
contents: read
9-
packages: write
109

1110
jobs:
1211
publish:
@@ -23,9 +22,9 @@ jobs:
2322
uses: actions/setup-node@v4
2423
with:
2524
node-version: '20'
26-
registry-url: 'https://npm.pkg.github.com'
25+
registry-url: 'https://registry.npmjs.org'
2726

2827
- name: Publish
29-
run: npm publish
28+
run: npm publish --access public
3029
env:
31-
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/validate.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,21 @@ jobs:
1515
uses: actions/checkout@v6
1616

1717
- name: Validate configuration and scripts
18+
shell: pwsh
19+
run: ./scripts/validate-repo.ps1
20+
21+
test-pester:
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v6
27+
28+
- name: Run Pester tests
1829
shell: pwsh
1930
run: |
20-
./scripts/validate-repo.ps1
31+
$results = Invoke-Pester tests/ -PassThru
32+
if ($results.FailedCount -gt 0) { exit 1 }
2133
2234
test-cli:
2335
runs-on: ubuntu-latest

CHANGELOG.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,27 @@
22

33
All notable changes to this project will be documented here.
44

5+
## [1.1.0] — 2026-03-17
6+
7+
### Added
8+
- CLI: retry logic with exponential backoff for transient HTTP failures
9+
- CLI: comprehensive unit tests for scoring algorithm (15 test cases)
10+
- CI: CLI unit tests and smoke test in validate workflow
11+
- GitHub Action (`action.yml`) as composite reusable action for other repos
12+
13+
### Fixed
14+
- CLI: correct rate-limit header extraction from GitHub API responses
15+
- CLI: handle missing/null fields gracefully in score computation
16+
17+
### Changed
18+
- Bumped `actions/checkout` from v4 to v6 in all workflows
19+
- README reframed for honest contribution scope (removed inflated aggregate claims)
20+
- CONTRIBUTING.md updated to reference config-driven workflow
21+
522
## [1.0.0] — 2026-02-27
623

724
### Added
8-
- Automated health tracking for 7 OSS packages (9,066 combined stars, 1.6M npm downloads/week)
25+
- Automated health tracking for 7 OSS packages across the tracked ecosystem
926
- GitHub Actions workflow running every 6 hours — zero manual updates required
1027
- Machine-readable JSON evidence snapshots in `evidence/`
1128
- Human-readable Markdown SLA reports per tracked repo

CONTRIBUTING.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ An automated health tracker for open-source packages that need maintenance. The
88

99
### Add a new tracked package
1010

11-
1. Add the target definition in `scripts/update-ecosystem-status.ps1`
12-
2. Add a corresponding `update-review-sla.ps1` call in `.github/workflows/evidence-daily.yml`
13-
3. Run all scripts locally to verify output
14-
4. Submit a PR with the script changes + generated evidence files
11+
1. Add the repository definition to `config/tracked-repositories.json` — this is the single source of truth
12+
2. Run `./scripts/validate-repo.ps1` to check the config
13+
3. Run `./scripts/update-all-evidence.ps1` to generate evidence files
14+
4. Submit a PR with the config change + generated evidence files
1515

1616
### Improve the scripts
1717

@@ -22,10 +22,15 @@ An automated health tracker for open-source packages that need maintenance. The
2222
## Running Locally
2323

2424
```powershell
25-
./scripts/update-evidence.ps1
26-
./scripts/update-ecosystem-status.ps1
27-
./scripts/update-review-sla.ps1
28-
./scripts/update-action-queue.ps1
25+
# Validate config and structure
26+
./scripts/validate-repo.ps1
27+
28+
# Full refresh (runs all steps)
29+
./scripts/update-all-evidence.ps1
30+
31+
# Health scores + trends (after evidence refresh)
32+
./scripts/compute-health-scores.ps1
33+
./scripts/compute-trends.ps1
2934
```
3035

3136
Set `GITHUB_TOKEN` for higher API rate limits:

README.md

Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# OSS Maintenance Log
22

3-
> <!-- TAGLINE:START -->One maintainer. 7 packages. **1.4M npm downloads/week** kept alive.<!-- TAGLINE:END -->
3+
> <!-- TAGLINE:START -->Contributing to 7 open-source packages**1.4M npm downloads/week** across tracked ecosystem.<!-- TAGLINE:END -->
44
55
[![⭐ Star if useful](https://img.shields.io/badge/⭐-Star_if_useful-ffd700?style=for-the-badge)](https://github.com/dusan-maintains/oss-maintenance-log/stargazers)
66
[![npm](https://img.shields.io/npm/v/oss-health-scan?style=for-the-badge&color=cb3837&label=npm)](https://www.npmjs.com/package/oss-health-scan)
@@ -11,7 +11,7 @@
1111
<!-- RUN_STATUS:END -->
1212
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](./LICENSE)
1313
[![Tracked Packages](https://img.shields.io/badge/packages%20tracked-7-blue.svg)](#currently-tracked-projects)
14-
[![Weekly npm Downloads](https://img.shields.io/badge/npm%20downloads%2Fweek-1.4M%2B-brightgreen.svg)](#-live-data)
14+
[![Tracked Ecosystem](https://img.shields.io/badge/tracked%20ecosystem-1.4M%2B-brightgreen.svg)](#-live-data)
1515
[![Open PRs](https://img.shields.io/badge/upstream%20PRs-8%20open-orange.svg)](#contributions)
1616
[![Auto-Updates](https://img.shields.io/badge/auto--updates-every%206h-blueviolet.svg)](https://github.com/dusan-maintains/oss-maintenance-log/actions)
1717

@@ -103,7 +103,7 @@ Config-driven PowerShell + GitHub Actions that automatically:
103103
| [Hellenic/react-hexgrid](https://github.com/Hellenic/react-hexgrid) | 350 | 1,702 | 🟡 Maintainer Needed | ![health](evidence/badges/health-react-hexgrid.svg) | [#123](https://github.com/Hellenic/react-hexgrid/pull/123) |
104104
<!-- TRACKED_PROJECTS:END -->
105105

106-
**Combined: <!-- STATS:START -->83.7k stars · 1.4M npm downloads/week<!-- STATS:END -->**
106+
*Across tracked projects:* **<!-- STATS:START -->83.7k stars · 1.4M downloads/week across tracked projects<!-- STATS:END -->**
107107

108108
## Health Scoring
109109

@@ -139,26 +139,6 @@ Each package gets a **weighted health score (0–100)**:
139139
- **react-hexgrid #123** — Add tests for `GridGenerator.ring()` and `GridGenerator.spiral()`
140140
<!-- CONTRIBUTIONS_OPEN:END -->
141141

142-
<details>
143-
<summary><strong>Full contribution log (25 entries)</strong></summary>
144-
145-
| Date (UTC) | Project | Type | Link | Status |
146-
|---|---|---|---|---|
147-
| 2026-02-27 | jquery-modal | Fork | [dusan-maintains/jquery-modal](https://github.com/dusan-maintains/jquery-modal) | Active |
148-
| 2026-02-27 | jquery-modal | PR | [#315](https://github.com/kylefox/jquery-modal/pull/315) | Open |
149-
| 2026-02-27 | jquery-modal | PR | [#316](https://github.com/kylefox/jquery-modal/pull/316) | Open |
150-
| 2026-02-27 | jquery-modal | PR | [#317](https://github.com/kylefox/jquery-modal/pull/317) | Open |
151-
| 2026-02-27 | jquery-tablesort | Fork | [dusan-maintains/jquery-tablesort](https://github.com/dusan-maintains/jquery-tablesort) | Active |
152-
| 2026-02-27 | jquery-tablesort | PR | [#49](https://github.com/kylefox/jquery-tablesort/pull/49) | Open |
153-
| 2026-02-27 | python-shell | Fork | [dusan-maintains/python-shell](https://github.com/dusan-maintains/python-shell) | Active |
154-
| 2026-02-27 | python-shell | PR | [#320](https://github.com/extrabacon/python-shell/pull/320) | Open |
155-
| 2026-02-27 | rrule | Fork | [dusan-maintains/rrule](https://github.com/dusan-maintains/rrule) | Active |
156-
| 2026-02-27 | rrule | PR | [#664](https://github.com/jkbrzt/rrule/pull/664) | Open |
157-
| 2026-02-27 | react-hexgrid | Fork | [dusan-maintains/react-hexgrid](https://github.com/dusan-maintains/react-hexgrid) | Active |
158-
| 2026-02-27 | react-hexgrid | PR | [#123](https://github.com/Hellenic/react-hexgrid/pull/123) | Open |
159-
160-
</details>
161-
162142
## Use It Yourself
163143

164144
### Quick Scan (no install)
@@ -226,10 +206,11 @@ jobs:
226206
config/tracked-repositories.json ← All configuration
227207
scripts/
228208
common.ps1 ← Shared functions (DRY)
229-
update-all-evidence.ps1 ← Orchestrator
209+
update-all-evidence.ps1 ← Single orchestrator (full pipeline)
230210
compute-health-scores.ps1 ← Health scoring (0-100)
231211
compute-trends.ps1 ← 180-day trend engine
232212
check-alerts.ps1 ← Auto GitHub Issues
213+
update-readme-stats.ps1 ← Auto-regenerates all README sections
233214
cli/
234215
bin/scan.js ← CLI entry point
235216
lib/scoring.js ← JS health algorithm
@@ -241,9 +222,9 @@ tests/
241222
common.Tests.ps1 ← Pester tests (21 passing)
242223
health-score.Tests.ps1
243224
.github/workflows/
244-
evidence-daily.yml ← Cron: every 6 hours
245-
validate.yml ← CI: config validation
246-
publish-cli.yml ← Auto-publish on release
225+
evidence-daily.yml ← Cron: full pipeline every 6 hours
226+
validate.yml ← CI: config + Pester + CLI tests
227+
publish-cli.yml ← Publish to npm on release
247228
```
248229

249230
## License

cli/bin/scan.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ async function main() {
179179

180180
for (const info of infos) {
181181
if (info.error) {
182+
if (!flags.json) process.stderr.write(` ⚠ ${info.name}: ${info.error}\n`);
182183
results.push({ name: info.name, health_score: null, error: info.error });
183184
continue;
184185
}

docs/ARCHITECTURE.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,35 @@ OSS Maintenance Log is a public evidence system for open-source maintenance work
1717

1818
## Refresh Flow
1919

20+
Single orchestrator (`update-all-evidence.ps1`) runs the full pipeline:
21+
2022
1. Load tracked repositories from the config.
2123
2. Generate `evidence/ecosystem-status.json` and `.md`.
2224
3. Generate per-repository detailed snapshots.
2325
4. Generate per-repository review SLA reports.
2426
5. Generate the cross-repo action queue.
25-
6. Write a refresh manifest with global and per-repository status.
26-
7. Regenerate marker-based sections in `README.md`.
27+
6. Compute health scores (0–100) with SVG badges.
28+
7. Compute 180-day trends (7d/30d deltas).
29+
8. Check alert thresholds and auto-create GitHub Issues.
30+
9. Write preliminary manifest (so README generator can read freshness data).
31+
10. Regenerate ALL marker-based sections in `README.md`:
32+
- `TAGLINE` and `STATS` (inline) from ecosystem summary + manifest freshness.
33+
- `TRACKED_PROJECTS` table from config + ecosystem + health data.
34+
- `CONTRIBUTIONS_MERGED` from ecosystem PR details (merged_at).
35+
- `CONTRIBUTIONS_OPEN` from ecosystem PR details (state = open).
36+
- Badge URLs (tracked packages count, open PRs, ecosystem downloads).
37+
11. Write final manifest including all step results.
38+
39+
Every step is wrapped in `Invoke-RefreshStep` — failures are caught, logged, and tracked in the manifest. Downstream steps check for required inputs and skip gracefully if dependencies failed.
2740

2841
## Automation
2942

3043
- `.github/workflows/evidence-daily.yml`
31-
Scheduled refresh every 6 hours.
44+
Scheduled refresh every 6 hours. Single orchestrator call + commit.
3245
- `.github/workflows/validate.yml`
33-
Validation on push and pull request.
46+
Validation on push and PR: config validation, Pester tests, CLI unit tests.
47+
- `.github/workflows/publish-cli.yml`
48+
Publish CLI to npm on release.
3449
- `action.yml`
3550
Composite action for reuse in other repositories.
3651

docs/DATA_MODEL.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Key fields:
2828
- `summary.total_forks`
2929
- `summary.total_npm_downloads_last_week`
3030
- `projects[]`
31+
- `projects[].tracked_pr_details[].merged_at` — used by README generator to distinguish merged from closed PRs
3132

3233
### `evidence/latest-status-*.json`
3334

@@ -87,11 +88,13 @@ Key fields:
8788

8889
`README.md` contains marker-delimited generated sections:
8990

90-
- `TAGLINE`
91-
- `STATS`
92-
- `TRACKED_PROJECTS`
93-
- `CONTRIBUTIONS_MERGED`
94-
- `CONTRIBUTIONS_OPEN`
95-
- `LIVE_DATA`
91+
- `TAGLINE` — inline, auto-generated from ecosystem summary
92+
- `RUN_STATUS` — workflow badges, static
93+
- `STATS` — inline, auto-generated from ecosystem summary + manifest freshness
94+
- `TRACKED_PROJECTS` — block, auto-generated table from config + ecosystem + health data
95+
- `CONTRIBUTIONS_MERGED` — block, auto-generated from ecosystem PR details (merged_at != null)
96+
- `CONTRIBUTIONS_OPEN` — block, auto-generated from ecosystem PR details (state = open)
97+
- `LIVE_DATA` — static links to evidence files
9698

99+
All marker sections except `RUN_STATUS` and `LIVE_DATA` are regenerated by `update-readme-stats.ps1`.
97100
Do not remove or rename these markers without updating validation and regeneration logic.

0 commit comments

Comments
 (0)