omp packages

pi-pr-glance0.1.1

One-call GitHub PR summary for Pi: failing checks with log tails, unresolved review threads, reviews, and Codex/Bugbot status.

haydenmeloche Published 9 hours ago MIT ~0 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

pi-pr-glance

A Pi extension that adds one tool, pr_glance, which summarizes a GitHub pull request in a single call:

  • state, branches, size, merge readiness and review decision, or who merged it and the merge commit
  • who it's waiting on (requested people and teams), auto-merge and merge queue status, and how many commits it's behind the base branch
  • failing checks with up to 30 lines of each failed job's log, ending at the last error (logs for the first 3 failed jobs, fetched in parallel), and checks still running
  • unresolved review threads with file:line and the thread and comment IDs needed to reply or resolve them, ignoring resolved ones
  • the latest human reviews and comments
  • Codex and Cursor Bugbot status, including whether Codex reviewed the current head commit

Without it, an agent checking a PR chains gh pr view, gh pr checks, gh run view --log-failed and gh api calls, and reads a lot of output it doesn't need.

Install

pi install npm:pi-pr-glance
# or from GitHub
pi install git:github.com/HaydenMeloche/pi-pr-glance

Needs the GitHub CLI installed and logged in (gh auth login), and Node 22.6 or later. The tool uses gh's login and is read-only.

To try it without installing: pi -e npm:pi-pr-glance.

Use

Ask about a PR and the agent calls pr_glance on its own:

What's blocking acme/app#42?

The pr argument takes a PR URL, owner/repo#123, or repo#123 / #123 when the current directory is a clone with a GitHub origin.

Example output:

acme/app#42: Add a retry to the sync job
https://github.com/acme/app/pull/42
OPEN · retry-sync → main @ abcdef1 · by alice · +40 -3 in 2 files
merge: BEHIND (MERGEABLE) · review: CHANGES_REQUESTED · labels: backend
waiting on: acme/backend, erin · auto-merge on (squash, by alice) · 3 commits behind main

checks: FAILURE · 2 ok, 2 failing, 1 running
  … deploy-preview (in_progress)
  ✗ test (failure) https://github.com/acme/app/actions/runs/9/job/77
      ok 37
      ok 38
      ok 39
      FAILED src/sync.test.ts > retries
      ##[error]Process completed with exit code 1.
  ✗ ci/legacy (error) https://ci.example.com/1

unresolved threads: 2
  - src/sync.ts:12 · chatgpt-codex-connector (+1 replies): Retry loop never stops The loop has no max attempts.
    https://github.com/acme/app/pull/42#discussion_r1 · thread PRRT_t0 · comment 5000
  - src/old.ts:7 (outdated) · bob: rename this
    https://github.com/acme/app/pull/42#discussion_r3 · thread PRRT_t2 · comment 5020

reviews:
  - bob: changes_requested on 1111111: needs a cap on retries

recent comments (last 1):
  - dave: Can we ship this today?

bots:
  codex: completed, unresolved findings, reviewed 1111111 not head
  bugbot: left comments (1 issues)

Right after a push, before CI has started on the new commit, the checks line says so instead of reporting a pass.

Benchmark

On six fake PRs answered against a mock GitHub CLI, pr_glance cut the time to an answer by 30%, gh calls by 50%, and tokens by 28% (about half on PRs whose cause is in a failing job's log), and got the ready-to-merge verdict right every time, against 83% without it. See bench/README.md for how the benchmark works, the full results, and how to rerun it.

Develop

npm install
npm test
npm run typecheck
pi -e ./src/index.ts

License

MIT