omp packages

@yusukeshib/pi-pr-link0.2.2

Show the GitHub PR for the current branch as a clickable link in the footer.

yusukeshib Published 12 days ago MIT ~221 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

@yusukeshib/pi-pr-link

A pi extension that shows the GitHub PR(s) for the current branch as clickable links in the footer status area.

If the working directory is a git repo, it runs gh pr view to resolve the PR for the checked-out branch. If it's a container directory holding multiple repos, each immediate child repo is checked and every open PR is shown. Links are pinned into the footer via ctx.ui.setStatus() as OSC 8 hyperlinks, so they're clickable in terminals that support it.

What it looks like

When the current branch has an open PR, the footer gains a bold green, clickable repo#number link:

mirage-web#1234

In a container directory of multiple repos, one link per repo with an open PR:

mirage-web#1234 mirage-api#56

Click a link (in a supporting terminal) to open the PR in your browser. When there's no PR — or you're not in or above any repo, or gh isn't installed — the status is simply hidden.

When it refreshes

  • on session start
  • after each agent run settles (agent_settled)
  • on demand via the /pr command (bypasses the cache)

To keep the footer cheap, a gh pr view result is reused for up to 60 seconds while a repo stays on the same branch, overlapping refreshes are coalesced, and at most 4 git/gh processes run at once. Only the interactive TUI shows the link: RPC, print, and JSON sessions (including subagent workers) never run git or gh.

Requirements

The GitHub CLI (gh) must be installed and authenticated:

gh auth status   # should show you're logged in

Install

pi install npm:@yusukeshib/pi-pr-link

Via git (no npm publish required):

pi install git:github.com/yusukeshib/pi-pr-link

Try it without installing:

pi -e npm:@yusukeshib/pi-pr-link

License

MIT