Use when told to check PR review, address feedback, resolve threads, or after creating a PR that received review comments. Also use when user says "check the review", "address issues", or "resolve threads". Checks BOTH file-level review threads AND PR-level comments (Copilot, Claude bot, reviewers).
Fetch all review threads on a PR, address actionable issues, resolve fixed/no-op threads, and push fixes.
/address-review — find PR from current branch automatically/address-review 123 — address review on PR #123If $ARGUMENTS is provided and is a number, use it as the PR number.
Otherwise, detect from current branch:
gh pr list --head "$(git branch --show-current)" --json number,url --jq '.[0]'
If no PR found, ask the user which PR to address.
Set variables for use in all subsequent steps:
PR_NUMBER=<detected or provided number>
OWNER=$(gh repo view --json owner --jq '.owner.login')
REPO=$(gh repo view --json name --jq '.name')
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
path
line
comments(first: 10) {
nodes {
body
author { login }
createdAt
}
}
}
}
}
}
}' -f owner="$OWNER" -f repo="$REPO" -F number=$PR_NUMBER
Filter to only unresolved threads. This is the primary source for file-level review comments.
These are comments NOT attached to specific file lines — posted on the PR body itself.
Issue comments (bot summaries, reviewer questions):
gh api repos/{owner}/{repo}/issues/$PR_NUMBER/comments
Review submissions (reviewer summaries posted via GitHub's "Submit review" button):
gh api repos/{owner}/{repo}/pulls/$PR_NUMBER/reviews
Note:
{owner}and{repo}are auto-substituted byghwhen inside a git repo.
Filter to comments/reviews that contain actionable feedback. Ignore:
Combine findings from Steps 2a and 2b into a single triage list. Step 2a covers file-level threads; Step 2b covers PR-level comments and review bodies. There should be no duplicates between them since they cover different types of feedback.
For each unresolved thread or actionable PR-level comment, read the comment and the current code at the file path + line:
| Classification | Action |
|---|---|
| Already fixed | Code already addresses the concern → resolve |
| Actionable | Valid issue, code needs change → fix it |
| Praise / No-op | Positive comment, no action needed → resolve |
| Question | Reviewer asked a question → reply with answer, then resolve |
If any threads are actionable:
If fixes were made:
git add -A)fix: address PR review feedbackFor each addressed thread (fixed, already-fixed, praise, or answered):
gh api graphql -f query='
mutation($threadId: ID!) {
resolveReviewThread(input: {threadId: $threadId}) {
thread { id isResolved }
}
}' -f threadId="THREAD_ID"
## Review Address Summary — PR #<number>
| Thread | File | Action | Status |
|--------|------|--------|--------|
| "concern about X" | path/file.kt:42 | Already fixed | Resolved |
| "missing null check" | path/other.kt:15 | Fixed | Resolved |
| "nice pattern!" | path/file.kt:30 | No-op (praise) | Resolved |
**Fixes pushed:** Yes/No
**Threads resolved:** X/Y
**Remaining unresolved:** Z (with reasons)
After resolving threads and pushing fixes, check CI:
gh pr checks $PR_NUMBER
Report: passing/failing/pending. If any check failed, show gh run view <run-id> --log-failed | tail -30.
$OWNER and $REPO match the actual repo (gh repo view)gh pr checks shows no checks: the CI may not have started yet — wait a moment and retrygh api returns 403: rate limited — wait or check gh auth statusgh pr list --head "$(git branch --show-current)"