Loading...
Loading...
Analyze and address unresolved feedback on a GitHub pull request. Use when the user has received PR review comments and wants to systematically address each piece of feedback, or when the user mentions PR feedback, review comments, or addressing reviewer concerns.
npx skill4agent add mgratzer/forge forge-address-pr-feedbackgh pr view --json numberisResolved# Get PR number and repo info
gh pr view <PR_NUMBER> --json number,title,headRefName,url
# CRITICAL: Use GraphQL to get ALL review threads with resolution status
gh api graphql -f query='
query {
repository(owner: "<OWNER>", name: "<REPO>") {
pullRequest(number: <PR_NUMBER>) {
reviewThreads(first: 100) {
nodes {
isResolved
isOutdated
path
line
id
comments(first: 10) {
nodes {
id
body
author {
login
}
url
}
}
}
}
}
}
}'# Get unresolved threads with full context
gh api graphql -f query='...' --jq '.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)'git add <files>
git commit -m "fix: Address PR feedback - <brief description>"# Reply to a review thread (NOT a PR comment!)
gh api graphql -f query='
mutation {
addPullRequestReviewThreadReply(input: {
pullRequestReviewThreadId: "<THREAD_ID>"
body: "<response>"
}) {
comment {
id
}
}
}'gh api repos/{owner}/{repo}/pulls/<PR_NUMBER>/comments/<COMMENT_ID>/replies \
-X POST \
-f body="<response>"<sha><sha>gh issue create \
--title "<concise description of the follow-up work>" \
--body "## Context
This issue was identified during PR review of #<PR_NUMBER>.
## Original Feedback
> <quote the reviewer's comment>
## Proposed Solution
<brief description of what should be done>
## Related
- PR: #<PR_NUMBER>
- Review comment: <link to the comment>"git push/pulls/{}/comments1. Fetch unresolved threads via GraphQL
2. For thread about "missing null check" in file.ts:149:
a. Read file.ts
b. Add null check
c. Run format/check
d. Commit: "fix: Add null check for edge case"
e. Reply to thread: "Fixed in commit `abc123`. Added null check."
3. For thread asking "why use X instead of Y?":
a. Reply to thread: "Using X because <reason>. Y would require <tradeoff>."
4. For thread about "add tests":
a. Create issue #123 for test coverage
b. Reply to thread: "Created #123 to track this - out of scope for this PR."
5. Push all commits
6. Summarize actions takenforge-reflect-prforge-update-changelogforge-setup-projectforge-create-issueforge-implement-issueforge-reflect-prforge-address-pr-feedbackforge-update-changelog/forge-address-pr-feedback 123
/forge-address-pr-feedback https://github.com/owner/repo/pull/123
/forge-address-pr-feedback # Uses current branch's PR