Loading...
Loading...
Use when needing to check PR review comments on current branch, before addressing reviewer feedback, or when asked to fetch/review PR comments
npx skill4agent add bumgeunsong/daily-writing-friends fetching-pr-commentsgh| Task | Command |
|---|---|
| Check if PR exists | |
| View PR with issue comments | |
| Fetch review comments (code-level) | |
| Extract key fields | |
gh pr view --json number --jq '.number'gh api repos/{owner}/{repo}/pulls/{n}/comments \
--jq '.[] | {path: .path, line: .line, body: .body}'gh api repos/OWNER/REPO/pulls/$(gh pr view --json number -q .number)/comments \
--jq '.[] | {path: .path, line: .line, body: .body}'| Type | What it shows | How to get |
|---|---|---|
| Issue comments | PR-level discussion | |
| Review comments | Code-level feedback | |
gh pr view 2>/dev/null && echo "PR exists" || echo "No PR"gh pr view --commentsgh pr view 429 --repo owner/repo --commentsgh pr creategh pr diffgh pr merge