Add gh uptime to report GitHub service status - #14094
Open
seanturner83 wants to merge 1 commit into
Open
Conversation
`gh uptime` reports the operational status of GitHub's services from the public status page at https://www.githubstatus.com. It queries the Statuspage summary API (not api.github.com) with no authentication, so it works even when your token is unset or when the API itself is degraded. Beyond a human-readable overview, it is built for automation: - `--json`/`--jq` for machine-readable output - `--component <name>` to scope to a single service (e.g. Actions) - `--exit-code` to exit non-zero when the target is not operational - `--watch` to poll until the target returns to operational Together these let a script wait out an incident and then resume, e.g.: gh uptime --component Actions --watch && gh workflow run ci.yml The command never sends the gh auth token to the third-party status host.
|
LGTM 🚀 |
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.
What
Adds
gh uptime: a command that reports the operational status of GitHub'sservices from the public status page (https://www.githubstatus.com).
It queries the Statuspage summary API — not
api.github.com— and sends noauthentication, so it works when your token is unset, and (the point) when the
API itself is degraded. The gh auth token is never sent to the third-party host.
Why
Partly for fun, but there's a real use case: holding automation until an
incident clears, then resuming. During an Actions outage you currently have to
poll
githubstatus.comby hand. With this you can let a script wait it out:Flags aimed at scripting:
--json/--jq— machine-readable output (gh uptime -c Actions --jq .operational→ a bare bool)--component <name>— scope to a single service (e.g.Actions)--exit-code— non-zero exit when the target is not operational, so it composes with&&--watch/--interval— poll until the target returns to operational (min 5s to respect the status page)Notes
cmdutil/iostreams/httpmockmachinery.DisableAuthCheck) since the status page is public.--exit-code, component scoping, unknown component, and--jsonexport — all viahttpmock, no network.Happy to adjust naming/scope — I picked
uptimeto avoid colliding with the existinggh status(notifications/activity).🤖 Generated with Claude Code