omp packages

@scriptdude/pi-merger0.2.0

pi extension: review, approve, merge and comment on open GitHub PRs from a full-screen TUI (via gh)

scriptdude Published 18 days ago MIT ~666 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-merger

A pi extension that opens a full-screen TUI to review open GitHub pull requests. All PR data comes from the gh CLI.

pi-merger: file list on the left, diff of the selected file on the right

Install

pi install npm:@scriptdude/pi-merger
# or straight from GitHub: pi install git:github.com/dimitritholen/pi-merger

Then /reload in pi. Requires gh, logged in (gh auth login).

Use

Run pi inside a git repo with a GitHub remote, then press ctrl+shift+m or type /merger.

Starting pi in a folder that holds several repos (direct subfolders with a .git) works too: the start screen lists open PRs from all of them, and f opens a dropdown to focus on one repo.

Flow: PR list → changed files (file list left, diff preview right; stacked on terminals under 100 columns) → select hunks.

Key Action
↑↓ / jk move (PR, file, or hunk)
enter / → open PR · select hunks in the diff
pgup pgdn / space scroll the diff
n p next / previous file
c comment on the selected hunk: sends file path, hunk and comment to the model in the current session (not posted to the PR)
a approve (confirm first; gh pr review --approve). Blocked on your own PRs
m merge (confirm first; pick s squash, m merge commit, r rebase). Not for drafts
u update branch: merge base into the PR branch (confirm first; gh pr update-branch)
f choose repository (only when several repos were found)
v filter: All, Created by me, Assigned to me, Review requested from me
u choose users (PR authors): space shows/hides a user, a shows all (remembered until pi restarts)
r refresh the PR list
esc back
q / ctrl+c quit

Errors from gh (missing, not authenticated, GitHub refusals such as conflicts) show in the status line.

Limits

First 100 open PRs per repo. Repos are only searched one level down. No syntax highlighting. Single-line comments. The diff is re-fetched each time a PR is opened.

Develop

npm install, then npm test (diff parser and gh error handling) and npm run typecheck.

License

MIT