Features

PR Management

Manage pull request reviews, threads, and comments efficiently

PR Management

Streamline your pull request review workflow with powerful comment and thread management.

Review Reply

Reply to pull request review comments directly from the command line.

v0.11.0+ Supports both Database ID (numeric) and Node ID (string) formats. The CLI automatically detects and converts IDs as needed.

Basic Reply

gh please pr review reply <comment-id> --body "Reply text"
# Short form: -b

Supported ID formats:

  • Database ID (numeric): 1234567890 - automatically converted to Node ID
  • Node ID (string): PRRC_kwDOP34zbs6ShH0J - used directly

Finding Comment ID:

  1. From GitHub Web UI (Database ID):
    • Click on review comment
    • URL shows: github.com/.../pull/123#discussion_r1234567890
    • Use the number after discussion_r (e.g., 1234567890)
  2. List review threads (Node IDs):
    gh please pr review thread list <pr-number>
    
  3. Using GitHub CLI:
    gh api /repos/OWNER/REPO/pulls/PR_NUMBER/comments
    
  4. List all comments:
    gh pr view --json comments --jq '.comments[] | "\(.id): \(.body)"'
    

Multi-line Reply

# Using Database ID (numeric)
gh please pr review reply 1234567890 --body "$(cat <<'EOF'
Great catch! I've addressed this by:
1. Adding proper error handling
2. Including unit tests
3. Updating documentation

Let me know if there are other concerns.
EOF
)"

# Using Node ID (string) - also supported
gh please pr review reply PRRC_kwDOP34zbs6ShH0J --body "$(cat <<'EOF'
Fixed in latest commit!
EOF
)"

Reply from Stdin

# Both ID formats supported
echo "Thanks for the review!" | gh please pr review reply 1234567890
echo "Thanks for the review!" | gh please pr review reply PRRC_kwDOP34zbs6ShH0J
cat reply.txt | gh please pr review reply 1234567890

Thread Resolution

Resolve review threads after addressing feedback.

Resolve All Threads

gh please pr review thread resolve <pr-number> --all

Example:

gh please pr review thread resolve 456 --all

Resolve Specific Thread

gh please pr review thread resolve <pr-number> --thread <thread-id>

Getting Thread ID:

# List all threads
gh api graphql -f query='
  query($owner: String!, $repo: String!, $number: Int!) {
    repository(owner: $owner, name: $repo) {
      pullRequest(number: $number) {
        reviewThreads(first: 100) {
          nodes {
            id
            isResolved
            comments(first: 1) {
              nodes {
                path
                body
              }
            }
          }
        }
      }
    }
  }
' -F owner=OWNER -F repo=REPO -F number=PR_NUMBER

Comment Management

List Review Comments

gh please pr comment list <pr-number> [--format json|markdown|xml]

Output formats:

  • json - Machine-readable JSON
  • markdown - Human-readable Markdown (default)
  • xml - Structured XML for LLM processing

Example:

gh please pr comment list 456
gh please pr comment list 456 --format json

Edit Review Comment

gh please pr review comment edit <comment-id> --body "Updated text" [--pr <number>]

Supported ID formats:

  • Database ID (numeric): Requires --pr <number> option for conversion
  • Node ID (string): Can be used directly without --pr option

Examples:

# Using Database ID (requires --pr for conversion)
gh please pr review comment edit 123456789 --body "Clarification: this applies to v2.0+" --pr 456

# Using Node ID (--pr is optional)
gh please pr review comment edit PRRC_kwDOP34zbs6ShH0J --body "Clarification: this applies to v2.0+"

PR Review Workflow

Complete workflow for handling code review feedback:

1. Receive Review Feedback

# View PR with comments
gh pr view 456

2. Address Feedback

# Make code changes
# Run tests, lint, etc.
git add .
git commit -m "fix: address review feedback"
git push

3. Respond to Comments

# Reply to each review comment (supports both Database ID and Node ID)
gh please pr review reply 2442802556 -b "Fixed in commit abc123"                # Database ID
gh please pr review reply PRRC_kwDOP34zbs6ShH0J -b "Fixed in commit abc123"    # Node ID
gh please pr review reply 2442802557 -b "Updated in commit abc123"

4. Resolve Threads

# Resolve all threads after addressing feedback
gh please pr review thread resolve 456 --all

5. Ready for Merge

# Verify all changes are pushed
git status
git log -1 --oneline

# PR is ready for merge

API Limitations

ID Format Support (v0.11.0+)

All comment operations now support both ID formats:

Database ID (numeric):

  • Example: 1234567890
  • Automatically converted to Node ID via REST API
  • Requires additional context (--pr or --issue option) for edit operations

Node ID (string):

  • Example: PRRC_kwDOP34zbs6ShH0J (PR review comment), IC_kwDOABC123 (issue comment)
  • Used directly in GraphQL operations
  • No additional context required

The CLI automatically detects the format and handles conversion transparently.

Top-Level Comments Only

The GitHub API endpoint used for replies:

POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies

Important: This endpoint only accepts top-level review comments.

Works:

  • ✅ Replying to review comments on specific lines
  • ✅ Replying to review comments on files
  • ✅ Both Database ID and Node ID formats

Doesn't Work:

  • ❌ Replying to replies (nested replies)

Rate Limits

GitHub API has rate limits. For authenticated requests (via gh CLI):

  • 5,000 requests per hour for user-server requests

Check current rate limit:

gh api rate_limit

Common Options

All PR commands support:

  • --repo owner/repo or -R owner/repo - Target different repository
  • --format json|markdown|xml - Output format (list commands only)

Deprecated Commands

These commands still work but show deprecation warnings:

  • gh please review-reply → Use gh please pr review reply
  • gh please pr review-reply → Use gh please pr review reply
  • gh please pr resolve → Use gh please pr review thread resolve