PR Watch
Watch the CI checks on your GitHub pull requests from inside VS Code, and get an OS-level notification the moment they pass or fail. Works on macOS, Windows, WSL and Linux.
It talks to GitHub through the GitHub CLI (gh), so there is no token to configure.
Features
- Activity bar view with one collapsible section per watched PR. Expand a PR to see each check with a pass / fail / running icon; click a check to open it on GitHub. Running checks show a live elapsed timer (and
queued until they start), finished checks show how long they took, and each running PR shows its total time so far.
- Auto-watch on push (on by default): push a branch that has a pull request, from VS Code or a terminal, and it is watched automatically. If you push before opening the PR, it keeps looking for one for a while. It waits until GitHub has pointed the PR at the commit you pushed, so you never get a "passed" notification for the previous commit's checks.
- Status bar button (
Watch PR) that starts watching the PR for the branch you are on. While watches are running it shows a live count; if something failed it shows the failure count.
- OS notifications when a watch finishes: macOS Notification Centre, Windows toast, WSL (via the Windows side), Linux
notify-send. By default they only appear when VS Code is not the focused window; an in-editor message with buttons always appears. The text is a template you can change (repo name, PR number, PR title, branch, failing checks) and each status has its own icon.
- Failed job log: open the cleaned log of the failing run (no colour codes or timestamps).
- Re-run failed jobs from the view or from the failure notification.
- CI problems in the Problems panel: error annotations that point at files and lines appear as Problems when a watched PR fails.
- Compare with last green run: commits and files changed since the last passing run of the same workflow, a warning if a workflow file changed, a "likely flaky" flag when the same commit also has a passing run, and an optional diff of the failing job's log against the green run's (timestamps, ids and hashes masked).
- Workflow health: pass rate, average and latest duration, a duration trend sparkline, likely flaky runs, and the steps that fail most.
- Copy failure context: PR details, annotations and the tail of the failed log on your clipboard, ready to paste into a chat.
- Watches survive reloads; polling is on one timer for all PRs.
Requirements
- VS Code 1.85 or newer
gh installed and signed in (gh auth login), a recent version (it needs gh pr checks --json)
- WSL / Remote: this extension runs where your code lives, so install and sign in to
gh inside WSL. OS notifications from WSL are shown through Windows PowerShell.
Install
code --install-extension releases/pr-watch-<version>.vsix --force
or Extensions view → … menu → Install from VSIX…, then run Developer: Reload Window.
Commands
| Command |
What it does |
| PR Watch: Watch PR for Current Branch |
Same as the status bar button |
| PR Watch: Watch PR by Number or URL… |
Watch any PR, including other repositories |
| PR Watch: Toggle Auto-Watch on Push |
Turn automatic watching on or off |
| PR Watch: Show Workflow Health |
Health report for the current repository |
| PR Watch: Clear CI Problems |
Remove PR Watch entries from the Problems panel |
| PR Watch: Stop Watching All / Clear Finished / Refresh Now |
Housekeeping |
Per-PR and per-check actions (failed log, re-run, compare, copy context, open, stop) are the inline icons and right-click menu in the view.
Settings
| Setting |
Default |
|
prWatch.autoWatchOnPush |
true |
Start watching a branch's PR when you push it |
prWatch.autoWatchWaitForPrMinutes |
10 |
If the pushed branch has no PR yet, keep looking this long (0 = only if it already exists) |
prWatch.pollIntervalSeconds |
20 |
Polling interval (min 10). Each watched PR costs roughly 3600 ÷ interval API calls per hour. |
prWatch.failFast |
false |
Notify on the first failing check instead of waiting for all to finish |
prWatch.osNotifications |
whenUnfocused |
whenUnfocused, always or never |
prWatch.notificationTitle |
{icon} {repo} #{number}: {status} |
Title template, e.g. ✅ widgets [#7](https://github.com/hmredmond/vscode-extension-pr-watch-ci-notifier/issues/7): CI passed |
prWatch.notificationBody |
{title} ({branch}) {failures} |
Body template, e.g. Add widget (feat/widget) — build, lint |
prWatch.notificationIconPath |
(empty) |
Path to your own PNG; empty uses the built-in pass / fail / info / warning icons |
prWatch.notifyOn |
all |
all or failuresOnly |
prWatch.problemsOnFailure |
true |
Put CI annotations in the Problems panel |
prWatch.noChecksTimeoutMinutes |
5 |
Give up on a PR that never reports checks |
prWatch.ghPath |
gh |
Path to the CLI |
Notification templates
Placeholders for the title and body settings: {icon} (✅ ❌ ℹ️ ⚠️), {status} ("CI passed", "CI failed", …), {repo} (repository name only), {owner}, {number}, {title} (PR title), {branch}, {failedChecks} ("build, lint +2 more"), {failures} ("— build, lint" when something failed, otherwise empty) and {error}. Unknown placeholders are left as typed, and extra spaces from empty placeholders are removed.
Notification icons and clicking
| Platform |
Icon |
Click opens the PR |
| macOS |
Only with terminal-notifier (brew install terminal-notifier); the built-in notification always shows Script Editor's icon |
Only with terminal-notifier |
| Windows |
Yes, and the toast is labelled "PR Watch" |
Yes |
| WSL |
Best effort (the image has to be readable from Windows) |
Yes |
| Linux |
Yes (notify-send --icon) |
No |
Known limits
- Auto-watch relies on VS Code's built-in Git extension noticing the push (it does for pushes from a terminal too, as long as
git.enabled is on). If a commit and its push happen within about a second of each other (for example git commit && git push), the change can arrive as one update and be missed; use the status bar button then.
- If the same repository is open in two VS Code windows, both will auto-watch and both will notify.
- Without
terminal-notifier, macOS notifications cannot show a custom icon or be clicked. The in-editor message always has the buttons.
- Logs, re-run, compare and the Problems panel only work for checks that come from GitHub Actions; checks from other CI systems show status only.
- Problems are only created when the open folder is the same repository as the PR.
- Re-run waits a few seconds before watching again so GitHub can flip the run back to in-progress.
Development
npm install
npm test # compiles, then runs the tests against a fake gh
npm run package # builds a .vsix without changing the version
npm run release # bump the version, test, and build releases/pr-watch-<version>.vsix
npm run release takes the usual bump as an argument and a few options:
npm run release # patch: 0.2.0 -> 0.2.1
npm run release -- minor # 0.2.1 -> 0.3.0
npm run release -- major
npm run release -- 1.4.0 # exact version
npm run release -- --install # also install it into VS Code
npm run release -- minor --install
It compiles and runs the tests first, so a broken build never gets a version number, and if packaging fails it puts the old version back in package.json and package-lock.json.
Press F5 in VS Code to launch an Extension Development Host.