oakoss/claude-plugins/tree/main/plugins/pr-watch
pr-watch
Claude Code 플러그인입니다. Claude가 연 각 pull request를 프롬프트 위에 그려 GitHub 워크플로 진행률, 병합 가능 상태, 실패한 작업, 차단 이유, 기본 브랜치 병합, 푸시된 브랜치 검사를 보여 줍니다.
이 mod 소개
pr-watch는 Claude가 Bash 도구로 실행한 gh pr create 출력의 pull request와 그곳에서 실행한 git push 출력의 브랜치를 감시합니다. 각 pull request에 대해 생성부터 닫힐 때까지, 또는 검사를 통과해 병합될 때까지 프롬프트 위에 한 줄을 표시합니다. 실행 중인 워크플로에는 예상 진행률 표시줄, ✓ ready to merge, 실패한 작업 이름과 로그 링크, 차단 이유(충돌, 변경 요청, 뒤처진 브랜치, 이름 없는 규칙), 대기 상태, 기본 브랜치 실행 뒤의 병합 줄이 표시됩니다. 푸시된 브랜치에는 자체 ⟳ push <branch> 줄이 생깁니다. gh api graphql로 폴링하며(실행 중 10s마다, 사람을 기다리는 동안 60s마다, 푸시·병합·재실행 시에는 빠르게)호스트에서 gh에 로그인해야 하고 세션 동안 유지됩니다. 설치: claude plugin marketplace add oakoss/claude-plugins를 실행한 다음 claude plugin install pr-watch@oakoss를 실행하세요. Claude Code 2.1.289를 기준으로 빌드하고 테스트했습니다.
설치
먼저 작성자의 README에서 marketplace와 플러그인 이름을 확인하세요. 저장소 구조에 따라 명령어가 달라질 수 있습니다.
claude plugin marketplace add oakoss/claude-plugins claude plugin install pr-watch
원문 / README
pr-watch
A line above the Claude Code prompt for each pull request Claude opens, from the moment gh pr create prints its URL until the pull request closes, or until its merge has run its checks on the base branch. A branch Claude pushes gets a line too, until its checks pass.
#128 ● CI ████████████▏░░░░░░░░░░░ 1m11s / ~2m20s · CodeQL ✓ · Dependency Review ●
#128 ✓ ready to merge
#128 ✗ CI: Typecheck failed
#128 ⚠ conflicts
#128 merged into main · ● Release ████▏░░░░░░░░░░░░░░ 0m21s / ~1m40s · CI ●
#128 merged into main · ✓ checks passed
⟳ push feat/x · ● CI ███████▏░░░░░░░░░░░░░░░░░ 0m40s / ~2m20s
What it shows
- Running. Of the running workflows that hold a required check (any running one when nothing on the commit is required), the longest gets a progress bar. Its length is that workflow's last successful run, so the bar stops short of full until the run ends; a workflow with no successful run shows only the time so far, and a re-run shows
re-run, since GitHub keeps its first attempt's start time. The other workflows follow as marks:✓passed,✗failed,●running. - Ready to merge. GitHub reports the pull request mergeable: required checks pass, no review blocks it, and it has no conflicts.
- Failing. A job failed in a workflow that holds a required check, or in any workflow when nothing on the commit is required. The line names that job rather than a summary job that failed on it, and links to its log.
- Blocked. Conflicts, changes requested, a branch behind its base, or a rule GitHub does not name (
⚠ blocked). - Waiting. On a review, on a required check from a GitHub App, on GitHub to start the checks, on GitHub to work out the merge state, or on a draft to be marked ready.
- Merged. The line names the base branch,
#128 merged into main, and follows the merge commit's runs there, every workflow counting, with the same bar and marks. Once they finish it reads✓ checks passedor names the job that failed. It keeps reading for 90 seconds after the merge in case a later run starts. A passed merge then leaves the band a few seconds later. A failed one stays, read once a minute, until a re-run passes, and then leaves the same way; the×removes it sooner. A merge whose commit starts no runs within 90 seconds leaves the band. - Pushed. A branch Claude pushes with
git pushgets a line,⟳ push <branch>, that follows the runs on the branch's newest commit the way a merged line does: it reads✓ checks passedor names the job that failed, and leaves the same way. A branch that is the head of an open pull request hands its line to that pull request instead, upstream when the branch is on a fork. A push that moved no branch, such as a delete, a tag orEverything up-to-date, adds none, and neither does agit push -q, which prints nothing to read. A--dry-runprints what a push would, so it gets a line: a new branch leaves at its first read, and an existing one shows its current checks. A branch gone by the time it is read leaves at once, and one that cannot be read at all, such as on a hostghdoes not know, leaves once 90 seconds have passed.
When a workflow has run more than once on the same commit, only its newest run counts.
Once nothing the merge waits on is running, a workflow it does not wait on still shows as a mark while it runs or after it fails.
A toast says when a pull request turns ready to merge, a job fails in a workflow the merge waits on, or a merge's runs on the base branch pass or fail, once per change. A line says why when gh fails, and · more checks not shown when a commit has more check suites than one read returns (100). Hover a line and press × to stop watching it. A pull request closed without merging leaves the band.
pr-watch draws above whatever other plugins draw in the same band, rather than replacing it.
How it works
- It watches the pull request in the output of a
gh pr createthat Claude runs through its Bash tool, and the branches in the output of agit pushit runs there. Pull requests opened and branches pushed from your own terminal or a GitHub tool are not seen. - It reads each pull request with one
gh api graphqlcall: every 10 seconds while any workflow runs or GitHub is still settling, every 60 seconds while it waits on a person. When Claude runsgit push,gh pr merge,gh run rerunorgh workflow run, it reads every watched pull request at once and every 5 seconds for the next minute, while GitHub starts the new runs. Each workflow's length comes from onegh apicall the first time pr-watch sees it, asked again a minute later if that call fails. - It needs
gh, logged in to the pull request's host. GitHub Enterprise hosts are passed toghas--hostname. - Watched pull requests last for the session; a new session starts with none.
Install
claude plugin marketplace add oakoss/claude-plugins
claude plugin install pr-watch@oakoss
pr-watch is a mod: Claude Code runs its hooks module itself. It is built and tested against Claude Code 2.1.289.