Skip to content

Add gh-pulse: daily GitHub movement + traffic email with charts - #10

Merged
ralyodio merged 1 commit into
mainfrom
worktree-gh-pulse
Sep 13, 2026
Merged

ralyodio merged 1 commit into
mainfrom
worktree-gh-pulse

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

What

bin/gh-pulse scans every repo the gh token can see (own account plus every org, forks excluded), ranks the ones that moved since the previous run, and emails the ranking with each mover's traffic and 14-day charts.

  • Movement: stars, forks, commits, PRs opened/merged/closed, issues opened/closed, releases, plus GitHub traffic (views, unique visitors, clones, unique cloners). Referrers and popular content are fetched only for movers.
  • Score: star 5, fork 4, release 5, PR merged 3, PR/issue opened 2, commit 1 (capped 25), unique visitor 1, unique cloner 1, clone 0.5, view 0.2.
  • Window: growth of GitHub's 14-day traffic buckets since the previous snapshot, because GitHub publishes traffic one to two days late. A skipped run widens the window instead of losing data.
  • History: each run writes ~/.local/share/gh-pulse/snapshots/<date>.json.gz (raw per-repo counts + buckets). GitHub keeps nothing past 14 days, so this is the long-run record.
  • Mail: Resend, HTML with inline PNG charts (@resvg/resvg-js, installed on first run into lib/gh-pulse/). Failure sends a plain "FAILED" mail so a broken cron is not silent.

Tested

  • scripts-check passes.
  • Full run over 349 repos: ~1,400 API calls, ~30 s, no retries.
  • First real email sent 2026-09-13 03:06 UTC, baseline snapshot written.

Cron (13:05 UTC daily) is installed on this box; it falls back to the build worktree until this is merged, tagged and scripts-upgrade has moved ~/scripts to the new tag.

🤖 Generated with Claude Code

https://claude.ai/code/session_011gfb1vcQH5rf82HfbJvf1Z

Every repo the gh token can see (own + every org, forks excluded) is
checked for movement since the previous run: stars, forks, commits, PRs,
issues, releases, and the /graphs/traffic numbers (views, unique visitors,
clones, referrers, popular content). Movers are ranked by a weighted score
and emailed through Resend with 14-day charts (SVG rendered to PNG with
@resvg/resvg-js, inline via cid), and new/lost followers are named.

GitHub publishes traffic in UTC-day buckets one to two days late, so the
window is the growth of each bucket since the previous snapshot rather
than a clock: nothing is missed or double counted when a run is skipped.
Every run writes a gzipped snapshot of the raw counts and buckets to
~/.local/share/gh-pulse/snapshots; GitHub keeps nothing past 14 days, so
those files are the long-run history.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011gfb1vcQH5rf82HfbJvf1Z
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​resvg/​resvg-js@​2.6.2991001008770

View full report

@ralyodio
ralyodio merged commit ce09909 into main Sep 13, 2026
4 checks passed
ralyodio added a commit that referenced this pull request Sep 13, 2026
PR #10 landed gh-pulse in this repo and profullstack/cli-tools#69 landed the
same tool, ported to TypeScript, with the terminal view, open, text and
json on top of the email. Two implementations of one name on PATH is the
drift cli-tools list marks with `!`, so this copy goes and the README points
at the other. No release was cut between the two, so nothing installed on
any box changes.


Claude-Session: https://claude.ai/code/session_011gfb1vcQH5rf82HfbJvf1Z

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant