resolve-github-pr-commentslisted
Install: claude install-skill xrhstosmour/macsify
<!-- markdownlint-disable MD013 -->
# Resolve GitHub PR Comments
## When to use
- `/resolve-github-pr-comments <pr_url>`
- User says "resolve pr comments" or "fix pr comments".
- The user mentions there are review comments to address on an open PR.
- The user says "there's feedback on my PR", "reviewer left comments", or "I got a review".
- The user is on a PR branch and asks to "handle the review" or "address the comments".
## 0. Resolve the PR
If the user provides a GitHub PR URL, extract `owner`, `repo`, and `pr_number`:
```text
# From URL: https://github.com/<owner>/<repo>/pull/<number>
```
If the user provides a branch name, fetch it:
```bash
gh pr view <branch> --json number,title,body,headRepository,url
```
If no URL or branch given, check if the current branch is a PR branch (not master/main):
```bash
git branch --show-current
```
If on `master` or `main`, stop and ask the user for a PR URL or branch name.
Otherwise, proceed using the current branch:
```bash
gh pr view --json number,title,body,headRepository,url
```
Store `owner/repo/pr_number`.
## 1. Prepare
1. Fetch `PR` metadata:
```bash
gh pr view <pr_number> --repo <owner>/<repo> --json number,headRepository,url,title
```
2. Extract `owner/repo/pr_number`
3. Fetch review threads:
```bash
gh api graphql --method POST -f query='query($owner:String!,$repo:String!,$number:Int!){repository(owner:$owner,name:$repo){pullRequest(number:$number){reviewThreads(first:100){nodes{id,isResolved