Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

gh-watch-scripts

Two bash scripts that block until a GitHub PR or Actions run finishes, then fire a Mac notification with pass/fail summary. Designed for agent callers — exit code reflects result so you can branch on it.

Scripts

pr-watch.sh

Wait for a PR's checks to finish.

./pr-watch.sh <pr-number-or-url-or-branch> [--interval N] [--quiet] [--no-notify]
  • Wraps gh pr checks --watch --fail-fast.
  • Prints PR=… result=PASS|FAIL|STILL PENDING pass=N fail=N pending=N exit=N.
  • Exits 0 on all-pass, non-zero on failure / still-pending.

run-watch.sh

Wait for a GitHub Actions run to finish.

./run-watch.sh <run-id-or-url> [--interval N] [--compact] [--quiet] [--no-notify]
  • Accepts raw run ID, run URL, or job URL (extracts parent run ID).
  • Wraps gh run watch --exit-status.
  • Prints run=… result=PASS|FAIL conclusion=… pass=N fail=N pending=N exit=N.
  • Exits 0 on success, non-zero on failure.

Requirements

  • gh — authenticated (gh auth login).
  • jq — for JSON parsing.
  • terminal-notifier — Mac notifications (brew install terminal-notifier). Use --no-notify to skip.

Flags

Flag Default Effect
--interval N 10 (pr-watch) / 3 (run-watch) Poll interval in seconds
--compact off (run-watch only) Show only failed/relevant steps in live output
--quiet, -q off Silent notification (no sound)
--no-notify off Skip the Mac notification entirely
-h, --help Print usage

Notification behavior

On finish:

  • PassGlass sound, title PR #N: PASS / PASS: <run title>.
  • FailBasso sound, body lists up to 3 failed check/job names.
  • PendingFunk sound (pr-watch only — run-watch blocks until terminal state).

Click notification → opens the PR or run URL in browser.

About

Block-until-done bash wrappers around gh CLI for PR checks and Actions runs, with Mac notifications.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages