Skip to content

Add gh-traffic.sh --summary flag for rollup-only output - #204

Merged
jasperf merged 1 commit into
mainfrom
feature/gh-traffic-summary-only-flag
Aug 29, 2026
Merged

jasperf merged 1 commit into
mainfrom
feature/gh-traffic-summary-only-flag

Conversation

@jasperf

@jasperf jasperf commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Version: 5.13.0

This release adds a --summary flag to gh-traffic.sh, giving users a way to view only the cross-repo rollup table introduced in 5.12.0 without the per-repo daily-breakdown detail. The flag works for any number of repositories, including a single one, and is intended for quickly scanning traffic totals across many repos at once. Because the summary table has no column for referrer data and per-repo detail is suppressed under --summary, the flag silently drops --referrers when it was requested directly or implied via --all. If --summary is combined with --referrers alone and no views or clones section remains active, the script now exits with an error rather than producing an empty summary. The change is accompanied by updated documentation, a new changelog entry, and a version bump to 5.13.0.

Script Behavior:

  • Added -s/--summary as a new flag on gh-traffic.sh that prints only the rollup table and skips the === owner/repo === per-repo sections entirely, useful for scanning traffic across many repositories without the noise of daily breakdowns.
  • The summary-selection logic was reworked so the rollup table prints whenever --summary is set, in addition to its prior condition of more than one repo with a views or clones section.
  • Added a guard that errors out when --summary is combined with --referrers and no views or clones section is active, since the summary table has no numeric column to populate in that case.

Documentation and Catalog Updates:

  • Updated the script's inline help text and --help output to document the new flag, its short form, and its interaction with --referrers.
  • Added a new usage example demonstrating --summary combined with --all across multiple repositories.
  • Updated go/internal/catalog/catalog.json to register the --summary flag for the gh-traffic command, keeping the CLI catalog in sync with the script.
  • Added a 5.13.0 entry to CHANGELOG.md describing the new flag, its scope, and its edge-case behavior with referrers.

Files Changed:

The 5.12.0 summary table always printed above the full per-repo
detail, with no way to see only the rollup. --summary shows just
that table for any number of repos and drops --referrers (directly
or via --all), since the summary has no column for it and per-repo
detail — where referrers would otherwise show — isn't printed under
--summary. Errors if no views or clones section remains active.

Bump to 5.13.0.
@jasperf
jasperf merged commit ab8ecbc into main Aug 29, 2026
1 check passed
@jasperf
jasperf deleted the feature/gh-traffic-summary-only-flag branch August 29, 2026 03:33
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