From gh-ops
Fetches GitHub notifications, classifies PRs/issues/discussions, skips irrelevant ones, and creates tq actions or instructions.
npx claudepluginhub mh4gf/tqGitHub notifications watcher. Fetch, classify, and create tq actions for each notification. ## Steps ### 1. Fetch notifications If the command fails, is blocked by permissions, or returns a non-zero exit code, report the error clearly and stop. Only report "No notifications" when the command succeeds with empty output. If 0 notifications, output "No notifications" and finish. ### 2. Process each notification For each notification, execute in order: #### 2a. Get details Extract repo name and number from subject_url, then fetch by subject_type: - **PullRequest**: `gh pr view <numbe...
/watchRuns the autonomous implementation loop with a live TUI dashboard showing current phase, active agent, progress bar, tokens, restarts, and scrolling transcript.
/watchMonitors background agents live by polling output files, displaying a status table with running/blocked/completed/waiting states and blocker suggestions.
/watchToggle real-time gas annotation mode. When active, Claude appends a gas impact note
/watchCheck for Claude Code updates, detect breaking changes, analyze plugin compatibility, and optionally gather community pulse via Exa.
/watchLearn from YouTube videos via Gemini transcription. Use when user says "watch", "transcribe youtube", "learn from video", or shares a YouTube URL to study.
GitHub notifications watcher. Fetch, classify, and create tq actions for each notification.
${CLAUDE_PLUGIN_ROOT}/scripts/gh-fetch-notifications
If the command fails, is blocked by permissions, or returns a non-zero exit code, report the error clearly and stop. Only report "No notifications" when the command succeeds with empty output.
If 0 notifications, output "No notifications" and finish.
For each notification, execute in order:
Extract repo name and number from subject_url, then fetch by subject_type:
gh pr view <number> --repo <owner/repo> --json url,state,author,headRefName,reviewDecision,mergeStateStatus,statusCheckRollup,isDraft,reviews,reviewRequestsgh issue view <number> --repo <owner/repo> --json url,state,authorgh apiMark as read and skip if:
reason=review_requested and already reviewed (reviews contain own APPROVED/CHANGES_REQUESTED)reason=review_requested but own login (gh api /user --jq .login) is NOT in reviewRequests (neither as user nor as member of a requested team) — team review request where someone else was randomly assignedIf headRefName matches tq-<number>-:
# e.g. tq-42-fix-bug → action_id=42
# Build result from PR details fetched in 2a
tq action done <action_id> "Remote action created PR: <pr_url>
State: <state>, Review: <reviewDecision>, CI: <pass/fail/pending>, Draft: <yes/no>"
Mark as read and skip.
For actionable notifications, select the first matching instruction by priority:
| Priority | Condition | Instruction |
|---|---|---|
| 1 | reason=review_requested + not yet reviewed | /gh-ops:review-pr <PR_URL> |
| 2 | mergeStateStatus: "BEHIND" or conflicting | /gh-ops:fix-conflict <PR_URL> |
| 3 | statusCheckRollup has failure | /gh-ops:fix-ci <PR_URL> |
| 4 | reviewDecision: "CHANGES_REQUESTED" / unaddressed review comments | /gh-ops:respond-review <PR_URL> |
| 5 | reviewDecision: "APPROVED" + CI pass + mergeable | /gh-ops:merge-pr <PR_URL> |
| 6 | Own PR, not yet reviewed | /gh-ops:self-review <PR_URL> |
If no condition matches, do NOT use a slash command. Instead, write a detailed free-text instruction describing what needs to be done — include the PR/issue URL, the context from the notification, and specific next steps.
Excluded prompts (never select these): classify-gh-notification, classify-next-action, watch-gh-ops
Use tq search "<keyword>" to find matching tasks. Extract keywords from the notification title (PR number #123, ticket ID PROJ-456, repo name, feature name, etc.) and search.
Try in order, use the first match:
# If new task needed
tq task create "<title>" --project <project_id> --meta '{"url":"<url>"}'
# Create action (instruction is the slash command from 2d)
tq action create <instruction> --task <task_id> --title "<title>"
${CLAUDE_PLUGIN_ROOT}/scripts/gh-mark-notification-read <thread_id>
GitHub notifications processed. Fetched: N, Skipped: M, Actions created: K.
[list of each action summary]
Execute /tq:done.
gh CLI (GitHub API tokens are managed by gh).