From gh-copilot-review
Wait for a GitHub Copilot review on the current branch's PR, address all feedback, and push fixes. Use when user says "/gh-copilot-review", "copilot review", or "wait for copilot".
How this skill is triggered — by the user, by Claude, or both
Slash command
/gh-copilot-review:gh-copilot-reviewThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Wait for a GitHub Copilot review on the current branch's PR, address all feedback, and push fixes.
Wait for a GitHub Copilot review on the current branch's PR, address all feedback, and push fixes.
Run ${CLAUDE_PLUGIN_ROOT}/scripts/watch-copilot-reviews.sh and wait for it to exit. It auto-detects the PR from the current branch. If @copilot hasn't been requested yet, it adds @copilot as a reviewer automatically. It polls until the review is submitted, then exits.
If CLAUDE_PLUGIN_ROOT is not set, find the script relative to this SKILL.md (../../scripts/watch-copilot-reviews.sh).
Store the repo name and PR number in variables:
REPO=$(gh repo view --json nameWithOwner --jq '.nameWithOwner')
PR_NUMBER=$(gh pr view --json number --jq '.number')
First, get the latest Copilot review ID so we only address current feedback (not old, already-resolved reviews):
LATEST_REVIEW_ID=$(gh api "repos/$REPO/pulls/$PR_NUMBER/reviews" --jq '[.[] | select(.user.login | test("copilot"; "i"))] | last | .id')
Then fetch only the comments from that review:
gh api "repos/$REPO/pulls/$PR_NUMBER/comments" --jq "[.[] | select(.user.login | test(\"copilot\"; \"i\")) | select(.pull_request_review_id == $LATEST_REVIEW_ID)]"
For each comment, extract: id, node_id, path, line (fall back to original_line), body, and any ```suggestion code blocks.
For each inline comment:
suggestion code block, apply the exact suggested changeFor each comment you addressed, post a reply explaining what was done:
gh api "repos/$REPO/pulls/$PR_NUMBER/comments/$COMMENT_ID/replies" -f body="Done — applied the suggested change."
Tailor the reply to what you actually did (applied suggestion, made a fix, or explained why no change was needed).
First, get the review thread IDs using GraphQL. Split $REPO into owner and name parts:
OWNER=$(echo "$REPO" | cut -d/ -f1)
REPO_NAME=$(echo "$REPO" | cut -d/ -f2)
gh api graphql -f query='
query {
repository(owner: "'"$OWNER"'", name: "'"$REPO_NAME"'") {
pullRequest(number: '"$PR_NUMBER"') {
reviewThreads(first: 100) {
nodes {
id
isResolved
comments(first: 1) {
nodes {
body
author { login }
}
}
}
}
}
}
}
'
Filter to only threads where comments.nodes[0].author.login matches Copilot (case-insensitive) and isResolved is false. Then resolve each one:
gh api graphql -f query='
mutation {
resolveReviewThread(input: { threadId: "'"$THREAD_NODE_ID"'" }) {
thread { isResolved }
}
}
'
Stage all changes, commit with a message like fix: address Copilot review feedback, and push to origin.
Do not chain git commands with && — Claude Code treats chained commands as a single compound command, requiring a new permission prompt even if each individual command was previously approved. Run git add, git commit, and git push as separate Bash calls.
npx claudepluginhub ericboehs/claude-plugins --plugin gh-copilot-reviewAddresses code review feedback by validating issues, fixing valid ones, and batch-committing changes. Handles local agent feedback or GitHub PR threads via /fix-code-review-feedback or auto-invocation.
Automates addressing GitHub PR review comments: fetches feedback from reviewers/bots, applies code fixes, verifies changes, pushes updates, resolves threads, requests re-review. Use on PR branches with pending feedback.
Fetches GitHub PR review comments via gh CLI, inventories by file/line/author, addresses each with code fixes, runs tests, commits referencing PR, pushes, and reports resolutions.