1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
#+TITLE: Triage Intake — Personal GitHub PRs Source
#+AUTHOR: Craig Jennings & Claude
#+DATE: 2026-05-26
# Source plugin for the triage-intake engine. See triage-intake.org for the
# contract and the Phase A-D orchestration. This file declares ONE source.
#
# This is the GENERAL (github.com) PR source. A work project on GitHub
# Enterprise declares its own triage-intake.<work>-prs.org plugin with
# --hostname and its own repos/conventions; it does not edit this file.
* Source: github-prs
:PROPERTIES:
:ORDER: 40
:ENABLED: command -v gh && gh auth status
:ANCHOR: iso8601
:SUBAGENT_OVER: 40
:END:
** Scan
Open PRs needing Craig's attention across his personal GitHub projects. Two queries — PRs returns *state*, so the anchor is advisory (the engine substitutes =<anchor-iso8601>= into the optional =--updated= filter for recency; open-PR state is the real signal):
#+begin_src bash
# PRs Craig opened
gh search prs --author=@me --state=open \
--json number,title,repository,state,isDraft,updatedAt,url
# PRs awaiting Craig's review
gh search prs --review-requested=@me --state=open \
--json number,title,repository,state,isDraft,updatedAt,url
#+end_src
=@me= resolves to the authenticated personal GitHub account, so no username is hardcoded. Add =--owner <account-or-org>= to scope to specific personal projects when the full-account search is too broad.
=gh search prs= can't return =reviewDecision= or CI status. For the handful that survive Phase B as Action candidates, drill in per-PR:
#+begin_src bash
gh pr view <N> --repo <repo> --json reviewDecision,statusCheckRollup,mergeable
#+end_src
** Classify
Action items, in priority order:
- *Craig's PRs that are mergeable* — approved, or no review required on a solo project, with CI green and no outstanding CHANGES_REQUESTED.
- *Craig's PRs with CHANGES_REQUESTED* — needs his response: rework and re-request, or push back with reasoning.
- *PRs awaiting Craig's review* — review requested from him, or new commits since his last review on a PR he's reviewing.
- *@mentions on any PR* — explicit ask.
FYI: approval landings with no remaining action, merge events on PRs already shipped, comments without questions.
Noise: stale draft updates, bot/CI status pings.
** Render
#+begin_example
**PRs (<repo or "personal">) — N open.**
- Mergeable now: <list>
- Changes requested on yours: <list>
- Review owed: <list>
#+end_example
Omit if nothing open needs attention.
** Actions
- merge :: =gh pr merge <N> --repo <repo> --squash --delete-branch= when no other PR stacks on the branch (verify via =gh pr list --repo <repo> --search "base:<branch-name>"=). If something stacks, =--squash= without =--delete-branch= and rebase the dependent PR afterward.
- comment :: =gh pr comment <N> --repo <repo>=
- review :: =gh pr review <N> --repo <repo>= (per Craig's call — approve / request-changes / comment)
- branch-clean :: =git push origin --delete <branch>= when the merge happened earlier and only branch deletion remains.
|