Add gh-traffic.sh --summary flag for rollup-only output - #204
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Version:
5.13.0This release adds a
--summaryflag togh-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--referrerswhen it was requested directly or implied via--all. If--summaryis combined with--referrersalone 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:
-s/--summaryas a new flag ongh-traffic.shthat 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.--summaryis set, in addition to its prior condition of more than one repo with a views or clones section.--summaryis combined with--referrersand no views or clones section is active, since the summary table has no numeric column to populate in that case.Documentation and Catalog Updates:
--helpoutput to document the new flag, its short form, and its interaction with--referrers.--summarycombined with--allacross multiple repositories.go/internal/catalog/catalog.jsonto register the--summaryflag for thegh-trafficcommand, keeping the CLI catalog in sync with the script.CHANGELOG.mddescribing the new flag, its scope, and its edge-case behavior with referrers.Files Changed:
CHANGELOG.md(Modified)go/internal/catalog/catalog.json(Modified)scripts/git/gh-traffic.sh(Modified)