- Swift 98.5%
- Makefile 1.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Prompt now fetches in parallel before copying to clipboard: - PR diff (15k char cap) - All commits - Issue/discussion comments - Formal reviews (Approve / Changes Requested with bodies) - Inline diff line comments (up to 30) - Changed files manifest (status + additions/deletions) - Full file contents for up to 12 changed files (security-relevant extensions prioritised: rb/py/js/ts/java/swift/go/sql/sh/yml/json) — each file capped at 8 000 chars ContextBuilder.ReviewContext: new struct holding all context XML structure: <review_request> security persona + Instructure context + output format <pull_request> metadata, labels <jira_ticket> enriched Jira details <commits> commit list with sha+url <description> PR body <formal_reviews> Approve/Changes Requested with bodies <inline_comments> per-file/line reviewer feedback <discussion_comments> conversation timeline <changed_files> manifest with change counts <file_contents> full source of touched files <diff> unified diff Security focus areas: FERPA compliance, multi-tenant isolation, injection, auth bypass, IDOR, sensitive data, rate limiting. |
||
| .github | ||
| docs | ||
| PRWatch | ||
| PRWatch.xcodeproj | ||
| PRWatchCLI | ||
| PRWatchTests | ||
| PRWatchWidget | ||
| Shared | ||
| .editorconfig | ||
| .gitignore | ||
| CHANGELOG.md | ||
| cliff.toml | ||
| default.profraw | ||
| Makefile | ||
| Procfile | ||
| project.yml | ||
| README.md | ||
PRWatch
A native macOS menu bar app and CLI for monitoring GitHub pull requests — with Jira integration, a Claude Code session launcher, a review gamification quest, and local SQLite history.
Built with Swift 6 / SwiftUI, targeting macOS 26 (Liquid Glass).
Features
| Feature | Details |
|---|---|
| 🔀 PR monitoring | GitHub GraphQL, real-time status: reviews, CI, mergeable state |
| 🔗 Jira integration | Live ticket summaries, status, priority inline in each PR row; assigned tickets section below PR list |
| ✦ Claude Code launcher | Writes CLAUDE.md + PR diff, opens iTerm2/Terminal for code review |
| 🦕 Review Quest | Gamified PR reviewing: streaks, XP, animated dino progress |
| 📊 Stats & History | 7-day health trend chart (Swift Charts), SQLite auto-saved snapshot history |
| 🗓 SQLite history | pr_snapshots + stats_snapshots tables, auto-saved every poll; query via prwatch history CLI |
| 📋 Slack templates | Copy per-PR or bulk Slack messages with customisable {jira_key} variables (Stepper fixed) |
| 📤 Export | Markdown / JSON / CSV reports with historical trend data |
| 🌙 Appearance | Dark / Light / Automatic toggle (Settings → General) |
| 💬 Last comment preview | Author, time, and body snippet shown inline in each PR row |
| 🔭 Mine / All toggle | Header toggle; status bar shows "5 mine · 2✓" |
| ⌨️ CLI | Full prwatch CLI with --json output, agent-friendly --help (QUICK START + JSON field docs) |
Requirements
| Tool | Version |
|---|---|
| macOS | 26.0+ |
| Xcode | 26+ |
| xcodegen | 2.42+ |
| GitHub PAT | repo scope + SSO authorised for your org |
Local dev setup
# 1. Clone
git clone https://github.com/peterlodri-sec/prwatch.git
cd prwatch
# 2. Install xcodegen (if not already)
brew install xcodegen
# 3. Generate the Xcode project
xcodegen generate
# 4. Open in Xcode
open PRWatch.xcodeproj
# 5. Set signing team
# Select the PRWatch target → Signing & Capabilities → Team → your Apple ID
# Repeat for PRWatchWidget
# (Free personal team works — no paid developer account needed)
# 6. Build & run
# Press ⌘R — PRWatch appears in the menu bar
First-time configuration
- Click the
⎇icon in the menu bar → ⚙️ Settings - GitHub tab → paste a Personal Access Token → Validate
- If using an Instructure (or other SSO org) token: authorise it for SSO first
- Jira tab → Base URL (
https://company.atlassian.net), email, API token → Validate - Repos tab → confirm
instructure/mc-mothershipis listed (add more withowner/repo) - Hit ↺ in the header to refresh
SwiftUI skills
This project uses swiftui-skills — Apple-authored SwiftUI guidance extracted from Xcode 26 — to keep the UI idiomatic and reduce hallucinations when using AI assistance.
Install once on any machine with Xcode 26:
curl -fsSL https://raw.githubusercontent.com/ameyalambat128/swiftui-skills/main/src/scripts/install.sh -o /tmp/swiftui-install.sh
bash /tmp/swiftui-install.sh --docs-path \
"/Applications/Xcode.app/Contents/PlugIns/IDEIntelligenceChat.framework/Versions/A/Resources/AdditionalDocumentation"
The skill is installed to ~/.claude/skills/swiftui-skills/ and is automatically available to Claude Code sessions in this repo.
Tests
# Run all 71 unit tests (unsigned, fast)
make test
# Or via xcodebuild directly
xcodebuild test \
-project PRWatch.xcodeproj \
-scheme PRWatch \
CODE_SIGNING_ALLOWED=NO \
ENABLE_TESTABILITY=YES
Test coverage:
| Suite | Tests | What's covered |
|---|---|---|
PullRequestTests |
12 | isReadyToMerge, QA label, needsRebase, age description |
JiraServiceTests |
8 | Ticket extraction from title/branch/body, edge cases |
GitHubServiceTests |
2 | GraphQL enum mapping, unknown value fallback |
PRStatsTests |
13 | Health score bounds, counts, oldest/most-commented |
ContextBuilderTests |
10 | Markdown sections, Jira, labels, body truncation |
QuestStateTests |
12 | Completion, fraction, XP, level titles |
SlackMessageServiceTests |
14 | Template variables, default template, nil-Jira fallback, bulk render |
| Total | 71 | 7 suites |
CLI
CLI Install from the app: Settings → General → CLI Tool section. Requires the PRWatchCLI target to be built first (included automatically when using ⌘B or make release). The binary is placed as a sibling to .app in the bundle's parent directory to preserve the app's code signature.
# Build and install the CLI
make install-cli # copies to /usr/local/bin/prwatch
# Auth
prwatch auth github --token ghp_…
prwatch auth jira --url https://company.atlassian.net --email me@co.com --token xxx
prwatch auth status
# List PRs
prwatch prs # table output
prwatch prs --json # machine-readable
prwatch prs --mine # only your PRs
prwatch prs --ready # only merge-ready
# Single PR
prwatch pr 6707 --repo instructure/mc-mothership
# Stats
prwatch stats
prwatch stats --json | jq '.health_score'
# Claude Code context
prwatch context 6707 --print # dump to stdout
prwatch context 6707 --copy # copy to clipboard
prwatch context 6707 # write CLAUDE.md + open claude
# Historical data (reads local SQLite)
prwatch history trend # 7-day health chart
prwatch history trend --json # JSON for automation
prwatch history pr 6707 --repo instructure/mc-mothership
See prwatch --help and prwatch <command> --help for full flag documentation and agent/pipeline tips.
CI / GitHub Actions
Three workflows in .github/workflows/:
| Workflow | Trigger | Runs on |
|---|---|---|
ci.yml |
push / PR to main |
macos-15 (generate + CLI build) + [self-hosted, macOS, Xcode-26] (full tests) |
release.yml |
push v* tag |
[self-hosted, macOS, Xcode-26] — tests → DMG → GitHub Release |
changelog.yml |
push to main |
ubuntu-latest — updates unreleased section of CHANGELOG.md |
Self-hosted runner (required for full CI)
The app uses macOS 26 APIs (glassEffect(), Swift 6) not available on GitHub-hosted runners.
make setup-runner # prints step-by-step setup instructions
Register your Mac at github.com/peterlodri-sec/prwatch/settings/actions/runners with labels macOS,Xcode-26.
Releasing
make changelog # update CHANGELOG.md
make ship VERSION=1.2.0 # test → DMG → tag → push → CI publishes release (current: v1.2.0)
Changelog format follows Conventional Commits (feat:, fix:, perf:, etc.) and is generated by git-cliff.
Repo
Source: https://github.com/peterlodri-sec/prwatch (private)
Full docs: docs/CONFLUENCE.md
License: MIT