A GitHub CLI extension that fetches and displays PR reviews, inline comments, and conversation comments. Designed for LLM-optimized output -- minimal tokens, maximum signal.
gh extension install Nittarab/gh-pr-reviewsGive your AI coding agent the ability to fetch PR reviews:
npx skills add Nittarab/gh-pr-reviews@skills# Auto-detect repo and PR from current branch
gh pr-reviews
# Explicit repo and PR number
gh pr-reviews owner/repo 42
# List all reviewers
gh pr-reviews --reviewers owner/repo 42
# Filter to a specific reviewer's last review
gh pr-reviews --reviewer copilot-pull-request-reviewer --last 1 owner/repo 42
# Hide conversation comments (keep only reviews + inline comments)
gh pr-reviews --no-comments owner/repo 42
# Include resolved threads (hidden by default)
gh pr-reviews --resolved owner/repo 42| Flag | Type | Default | Description |
|---|---|---|---|
--reviewer |
string | (none) | Show only reviews/comments from this reviewer |
--last |
int | 0 (all) | Show only the N most recent reviews per reviewer |
--reviewers |
bool | false | List reviewers summary table and exit |
--no-comments |
bool | false | Suppress conversation-level comments |
--resolved |
bool | false | Include resolved threads (hidden by default) |
Output is compact markdown optimized for LLM context windows:
# PR #42: Fix error handling (owner/repo)
## @alice [CHANGES_REQUESTED] 2024-01-15
Please fix the error handling.
- file1.go:42 — Rename this variable to be more descriptive
- pkg/api.go:10-15 [RESOLVED by @bob] — This function needs error handling
- @bob: Fixed in latest commit
## @alice [APPROVED] 2024-01-17
LGTM!
## Conversation
@alice (2024-01-14): Created this PR to refactor the API layer...
@bob (2024-01-15): Can you add benchmarks?file:linenotation instead of verbosefile (line X)- State in brackets
[APPROVED]on same line as author - No redundant headers or horizontal rules
- Inline comments as flat dash lists with reply threading
- Resolved threads marked with
[RESOLVED]suffix
Pipe PR reviews directly into your LLM workflow:
# Feed reviews into an AI assistant
gh pr-reviews owner/repo 42 | llm "Summarize the review feedback"
# Get only the last review from each reviewer
gh pr-reviews --last 1 --no-comments owner/repo 42 | llm "What changes are requested?"
# Check what Copilot found
gh pr-reviews --reviewer copilot-pull-request-reviewer owner/repo 42# Build locally
go build -o gh-pr-reviews
# Install locally for testing
gh extension install .
# Test
gh pr-reviews owner/repo 42Uses the GitHub GraphQL API to fetch reviews, review threads (with resolved status), and conversation comments in a single paginated query. The GraphQL API is required because the REST API has no concept of thread resolution status.
MIT