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.
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.
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.
gh— authenticated (gh auth login).jq— for JSON parsing.terminal-notifier— Mac notifications (brew install terminal-notifier). Use--no-notifyto skip.
| 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 |
On finish:
- Pass →
Glasssound, titlePR #N: PASS/PASS: <run title>. - Fail →
Bassosound, body lists up to 3 failed check/job names. - Pending →
Funksound (pr-watch only — run-watch blocks until terminal state).
Click notification → opens the PR or run URL in browser.