Skip to content

Repository files navigation

MacPRMonitor

macOS 13+ Apple Silicon Swift 5 MIT build

English | 中文

A tiny desktop window that watches your GitHub pull requests and highlights what changed — new commits, review / approval decisions, CI results, new comments, and merge / close — without keeping a browser tab open. It can also post a native macOS notification per change. Single-file Swift, zero third-party dependencies, built with swiftc. The UI is bilingual — switch 简体中文 / English from the menu bar (default 简体中文).

Screenshots

MacPRMonitor main window
Main window — repository names & PR titles redacted

How it works

  • Sources — auto-discovers three kinds of PRs for the signed-in account, and you can add any PR by URL:

    • mine — PRs you authored (author:@me)
    • review — PRs requesting your review (review-requested:@me)
    • reviewed — PRs you have already reviewed (reviewed-by:@me)

    Discovery is bounded by a monitoring window (last N days/hours), so it also picks up recently merged/closed PRs — not only open ones.

  • Atomic snapshot — each PR's state is read in a single GraphQL request, so a snapshot is always self-consistent; any error (including a GraphQL errors payload) fails the whole fetch rather than returning half a snapshot.

  • Pure differ — the new snapshot is diffed against the previous one to produce change events (commit / review / comment / inline comment / CI / lifecycle). The first poll emits one baseline line, not a field-by-field dump.

  • Robust polling — a fetch is a transaction: a failed fetch never pollutes the last good value; repeated failures mark a watch degraded and, past a threshold, a banner warns the view may be blind ("check the PR directly"). Terminal decisions (merged/closed) are made only on a successful poll.

  • Filter & sort — filter to only mine / only review-pending / only open; sort by activity (unread first) / updated time / state. Both are display-only — nothing is deleted. Items you dismiss with ✕ are remembered so auto-discovery won't re-add them.

  • Notifications — off by default; when on, each change also fires a native macOS notification.

The app is read-only: it only reads PRs through your token and never writes to GitHub. State (watches, dismissed ids, settings) persists to ~/.pr-monitor.json and UserDefaults.

Token / account

A GitHub token with repo read scope is required. It is resolved in order:

  1. a token you paste into the app's Account sheet — stored in the macOS Keychain;
  2. the GITHUB_TOKEN environment variable;
  3. your github.com credential from git credential.

The current identity is shown next to the title (@login). Use the Account sheet to switch accounts (paste another account's token) or clear the custom one. Your token/account is never written into this repo and is sent only to api.github.com.

Tested on

  • Apple Silicon (arm64), macOS 13 or later.

Build

Requires the Xcode Command Line Tools (xcode-select --install) — no Xcode project, no Swift Package Manager, no third-party dependencies.

./build.sh          # produces ./MacPRMonitor.app

The core compile command is the same in build.sh and CI:

swiftc -O -swift-version 5 -target arm64-apple-macos13.0 -o MacPRMonitor.app/Contents/MacOS/MacPRMonitor main.swift

build.sh also generates the icon (./makeicon.sh), writes Info.plist, and ad-hoc signs the bundle.

Run

open ./MacPRMonitor.app

Paste a token into the Account sheet (or set GITHUB_TOKEN / a git credential) and the window fills with your PRs. Controls: a top sort + filter row (sort by activity/updated/state, filter to only-mine/only-review/only-open, and a monitoring window), and a bottom row (refresh interval, notifications toggle).

First launch may be blocked by Gatekeeper (the app is ad-hoc signed, not notarized) — right-click the app and choose Open, or clear the quarantine flag: xattr -dr com.apple.quarantine MacPRMonitor.app.

Sharing the built app

Limit Detail
Architecture Apple Silicon (arm64) binary; rebuild on Intel if needed
Signing ad-hoc (codesign -s -); recipients right-click → Open, or xattr -dr com.apple.quarantine
Notarization none — not distributed via App Store
macOS 13 or later

Caveats

  • A GitHub token is required; the app is read-only and never writes to GitHub.
  • Discovery is windowed — only PRs updated within the monitoring window are auto-added; widen the window or add a PR by URL to track older ones.
  • ad-hoc signed, not notarized; Apple Silicon binary.
  • The bundled screenshot has repository names and PR titles redacted — a real window shows private data.

License

MIT © 2026 ExWang

About

A tiny macOS window that watches your GitHub pull requests — commits, reviews, CI, comments, merge/close — with optional native notifications. Single-file Swift, zero dependencies.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages