-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Cross-repo engagement radar -- star/fork/issue deltas across all repos
Milestone: v0.5.0
Type: Epic -- new capability layer for ghtraf
Problem
GitHub provides no built-in way to see engagement changes across all your repos and orgs. The notifications feed covers PRs, issue comments, and CI failures -- but not stars, forks, or newly opened issues on repos you don't actively watch. Devs maintaining many repos across multiple orgs have no "what should I pay attention to?" signal.
The GitHub Traffic API (what ghtraf uses today) is per-repo and covers views/clones/referrers. Cross-repo engagement data (stars, forks, issues, community health) lives in the GraphQL API and requires a different collection approach.
Vision
Extend ghtraf with a portfolio subcommand family that:
- Collects star/fork/issue counts across all user and org repos via
gh api graphql - Stores daily snapshots (same snapshot-then-diff pattern ghtraf already uses for traffic)
- Computes deltas -- "which repos gained/lost stars since last check?"
- Displays a cross-repo feed/timeline on the dashboard (new tab or standalone page)
- Surfaces engagement signals that GitHub notifications miss
Approach: Prototype-then-graduate
This follows the same proven path as setup-gists.py -> ghtraf create:
- Prototype (
scripts/star_radar.py) -- standalone script usinggh api graphql, local JSON storage - Graduate to
ghtraf portfolio collect/ghtraf portfolio showsubcommands - Dashboard integration -- portfolio tab on the existing dashboard, or a linked portfolio page
Execution model
The per-repo Actions workflow collects traffic data per-repo. The portfolio collector runs centrally -- once, for all repos -- as either:
- A scheduled Action in a single "portfolio repo" (e.g., the user's
.githubprofile repo) - Local cron / manual invocation via
ghtraf portfolio collect
Both use gh api graphql (subprocess call to gh, same pattern as existing gh.py). Zero new Python dependencies.
Data sources (GraphQL)
| Signal | GraphQL field | Notes |
|---|---|---|
| Stars | stargazerCount, stargazers(orderBy: STARRED_AT) |
Count + who/when |
| Forks | forkCount |
Count only (fork list requires separate query) |
| Open issues | issues(states: OPEN) { totalCount } |
Delta = new issues opened |
| Open PRs | pullRequests(states: OPEN) { totalCount } |
Delta = new PRs |
| Watchers | watchers { totalCount } |
Engagement signal |
| Releases | releases(first: 1) { nodes { publishedAt } } |
Last release date |
Related existing issues
- Fork registry & network tracking — historical fork visibility for project health #64 Fork registry & network tracking (per-repo fork visibility -- could feed into portfolio)
- Community Trends: show opened/closed issue deltas (candlestick-style) #60 Community Trends: issue deltas (per-repo -- portfolio aggregates across repos)
- Opt-in leaderboard with verified analytics — ethical ecosystem visibility #43 Opt-in leaderboard (ecosystem visibility -- portfolio is user-facing variant)
- ghtraf status and ghtraf list — multi-repo visibility from config #37
ghtraf statusandghtraf list(multi-repo visibility from config -- related UX) - Smart star history views — velocity vs. timeline with auto-detection #7 Smart star history views (per-repo -- portfolio is cross-repo variant)
Sub-issues
- Prototype: scripts/star_radar.py -- GraphQL cross-repo collector #70 -- Prototype:
scripts/star_radar.pyGraphQL cross-repo collector - Portfolio snapshot storage schema and delta engine #71 -- Portfolio snapshot storage schema and delta engine
- Portfolio dashboard: cross-repo star delta feed and timeline #72 -- Portfolio dashboard: cross-repo star delta feed and timeline
- ghtraf portfolio CLI subcommand family #73 --
ghtraf portfolioCLI subcommand family - Portfolio Actions workflow template #74 -- Portfolio Actions workflow template
Non-goals (for now)
- Replacing GitHub's per-repo Insights tab (ghtraf already does this better for traffic)
- User activity tracking (commits, PRs authored) -- this is about inbound engagement
- Social features (followers, profile views) -- focused on repo engagement
Analysis
See 2026-03-21__17-57-11__dev-workflow-process_cross-repo-analytics-extend-vs-separate.md for the full architectural analysis and decision rationale.