feat(scripts): add github-traffic.mjs for repo traffic insights

Zero-dep Node script that fetches the four GitHub Traffic endpoints
(views, clones, popular referrers, popular paths) plus core repo stats,
and prints a formatted report or raw JSON. Supports --save to append
JSONL snapshots so daily runs can build a >14-day history beyond the
GitHub API's retention window.

Wired as `npm run traffic`. Requires GITHUB_TOKEN with push access.
This commit is contained in:
Claude
2026-04-15 10:58:54 +00:00
parent f3745fa8fe
commit 193c6bf637
2 changed files with 187 additions and 1 deletions
+2 -1
View File
@@ -9,7 +9,8 @@
},
"scripts": {
"start": "node server.mjs",
"setup": "node setup.mjs"
"setup": "node setup.mjs",
"traffic": "node scripts/github-traffic.mjs"
},
"keywords": [
"openclaw",