fetching-pr-comments

Retrieve and parse GitHub PR review comments for the current branch using gh CLI.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "fetching-pr-comments" with this command: npx skills add bumgeunsong/daily-writing-friends/bumgeunsong-daily-writing-friends-fetching-pr-comments

Fetching PR Comments

Overview

Retrieve and parse GitHub PR review comments for the current branch using gh CLI.

Quick Reference

Task Command

Check if PR exists gh pr view

View PR with issue comments gh pr view --comments

Fetch review comments (code-level) gh api repos/{owner}/{repo}/pulls/{n}/comments

Extract key fields --jq '.[] | {path, line, body}'

Workflow

Get PR number for current branch:

gh pr view --json number --jq '.number'

Fetch review comments:

gh api repos/{owner}/{repo}/pulls/{n}/comments
--jq '.[] | {path: .path, line: .line, body: .body}'

Full command (single step):

gh api repos/OWNER/REPO/pulls/$(gh pr view --json number -q .number)/comments
--jq '.[] | {path: .path, line: .line, body: .body}'

Important Distinctions

Type What it shows How to get

Issue comments PR-level discussion gh pr view --comments

Review comments Code-level feedback gh api .../pulls/{n}/comments

Common Patterns

Check if current branch has a PR:

gh pr view 2>/dev/null && echo "PR exists" || echo "No PR"

Get PR details + comments in one view:

gh pr view --comments

Fetch specific PR by number:

gh pr view 429 --repo owner/repo --comments

When NOT to Use

  • Creating new PRs (use gh pr create )

  • Reviewing diffs (use gh pr diff )

  • Merging (use gh pr merge )

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

code-style

No summary provided by upstream source.

Repository SourceNeeds Review
General

firebase-functions

No summary provided by upstream source.

Repository SourceNeeds Review
General

pr-stacking

No summary provided by upstream source.

Repository SourceNeeds Review
General

api-layer

No summary provided by upstream source.

Repository SourceNeeds Review