Skip to content

feat(github): gh-prs PR triage board (gl-mrs twin)#276

Merged
fdaviddpt merged 2 commits into
masterfrom
max/gh-prs-triage-board
Jun 21, 2026
Merged

feat(github): gh-prs PR triage board (gl-mrs twin)#276
fdaviddpt merged 2 commits into
masterfrom
max/gh-prs-triage-board

Conversation

@fdaviddpt

Copy link
Copy Markdown
Contributor

Closes #274.

What

gh-prs — a GitHub PR triage board, the symmetric twin of gl-mrs. Lists PRs (default author=@me), sorted failing-first then stalest, each annotated with:

  • check rollup — a failure shows the failing check name (the failure class, pre-empting a gh-job call)
  • approval state (reviewDecision)
  • age, diff size, watch-state cross-reference
  • draft/conflict/threads flags
  • footer pointing at the first failing-and-unwatched PR

Key asymmetry vs gl-mrs

gh pr list --json statusCheckRollup,reviewDecision returns checks + approval in one call (GitLab needed a per-MR pipeline fetch). So the core board costs a single request; only unresolved review-thread counts enrich in a second parallel wave, skippable with nopipe. Reuses _gh + _fetch_review_threads from github/pr.py.

Surface

Filters: author/reviewer/assignee/label/state/per. Flags: nopipe, iids, failed.

Feeds the supervisor: bash presets/watch/watch-mine.sh 'gh-prs:author=@me,failed,iids' github-pr

Tests

tests/test_github_prs.py — 47 tests (arg parse, cmd build, rollup reduction, annotate, enrich, watch-state, render, sort, footer, main() watch contract). Full preset suite green.

Acceptance (#274)

  • lists open PRs sorted failing-first then stalest
  • failing checks show the check/workflow name
  • gh-prs:failed,iids emits a clean number list
  • watch-mine.sh 'gh-prs:author=@me,failed,iids' github-pr spawns watchers
  • unit tests for the pure helpers
  • docs: github.md row, watch.md caveat dropped, CHANGELOG entry

fdaviddpt added 2 commits June 1, 2026 13:19
Mirror gl-mrs as gh-prs in the github preset. Lists PRs (default
author=@me), sorted failing-first then stalest, each annotated with check
rollup (a failure shows the failing check name), approval (reviewDecision),
age, diff size, watch-state cross-reference, and draft/conflict/threads
flags. Footer points at the first failing-and-unwatched PR.

Unlike GitLab, gh pr list --json returns statusCheckRollup + reviewDecision
in one call, so the core board costs a single request; only unresolved
review-thread counts enrich in a second parallel wave (skip with nopipe).
Reuses _gh and _fetch_review_threads from github/pr.py.

Filters: author/reviewer/assignee/label/state/per. Flags: nopipe, iids,
failed. iids feeds watch-mine.sh: watch-mine.sh 'gh-prs:failed,iids' github-pr.

47 unit tests for the pure helpers + main() watch contract. Docs: github.md
row, watch.md caveat dropped, CHANGELOG.

Co-Authored-By: Max <noreply>
…ntext)

Cover the branchiest rollup helper explicitly — in-flight CheckRun (status),
pending StatusContext (state incl. EXPECTED, a valid GraphQL StatusState),
and terminal states. Review follow-up.

Co-Authored-By: Max <noreply>
@fdaviddpt fdaviddpt merged commit 7f16492 into master Jun 21, 2026
12 checks passed
@fdaviddpt fdaviddpt deleted the max/gh-prs-triage-board branch June 21, 2026 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gh-prs: GitHub PR triage board (gl-mrs twin)

1 participant