Skip to content

GitHub PR Integration

Navi displays comprehensive GitHub PR context directly in the TUI — CI/CD check statuses, review state, comments, labels, draft/merge status, and change statistics — so you never need to leave the terminal to understand your PR’s status.

  1. Install the gh CLI and authenticate (gh auth login)
  2. Open a session working on a branch with an open PR
  3. The session row shows a compact PR indicator: [PR#42 ✓]
  4. Press G to open the full git detail view with PR metadata
  5. Press c to read PR comments, r to refresh, o to open in browser

Each session row shows at-a-glance PR status:

IndicatorMeaning
[PR#42 ✓]All checks passing
[PR#42 ✗]Checks failing
[PR#42 ●]Checks pending/running
[PR#42 ✓ 💬5]Passing with 5 comments
[PR#42 draft]Draft PR

Press G to open the full detail view showing:

  • PR title and state — Color-coded OPEN/CLOSED/MERGED
  • Draft indicator(draft) in dimmed text for draft PRs
  • Merge status✓ No conflicts, ✗ Has conflicts, or ? Unknown
  • Review status✓ Approved by alice, bob / ✗ Changes requested by alice / ⏳ Review pending
  • Labels — PR labels displayed in dimmed text
  • Changed files12 files (+340 / -85)
  • CI/CD checks — Individual checks with status icons ( passed, failed, pending)
  • Check summaryChecks (3/4 passed)
KeyAction
rRefresh PR data from GitHub
cView PR comments
oOpen PR in browser
dView git diff
EscClose detail view

Press c from the git detail view to open a scrollable panel showing all PR comments:

  • Review comments include file path and line number: [filename.go:42]
  • General comments show author, timestamp, and body
  • All comments sorted chronologically
  • Scrollable with j/k, PgUp/PgDn, g/G

When the git detail view is open and checks are pending:

  • PR data refreshes automatically every 30 seconds
  • The ticker starts when pending checks are detected
  • Stops automatically when all checks reach a terminal state
  • Manual refresh (r) resets the interval
  • Display shows Auto-refreshing... indicator

PR metadata is fetched on-demand (not during regular polling) using the gh CLI:

Terminal window
gh pr view --json number,title,state,isDraft,mergeable,labels,changedFiles,additions,deletions,reviewDecision,reviews,comments,statusCheckRollup,url

For remote sessions, the -R owner/repo flag is used instead of relying on the local git directory.

Comments are fetched via the GitHub API:

Terminal window
gh api repos/{owner}/{repo}/pulls/{number}/comments # Review comments
gh api repos/{owner}/{repo}/issues/{number}/comments # General comments

Both types are merged and sorted chronologically.

  • PR detail is cached per session with a 60-second TTL
  • Lazy-loaded only when the user opens the git detail view
  • Does not affect the existing 5-second git info polling cycle

Checks are classified as:

ClassificationCriteria
PassedStatus=COMPLETED and Conclusion=SUCCESS
FailedStatus=COMPLETED and Conclusion=FAILURE/CANCELLED/TIMED_OUT
PendingEverything else (IN_PROGRESS, QUEUED, etc.)

Both GitHub Check Runs and Status Contexts are handled.

No additional configuration required. The gh CLI must be installed and authenticated. PR detection uses the existing git remote URL to determine the repository.