Skip to content

Instantly share code, notes, and snippets.

@SametSahin10
Created May 25, 2026 11:01
Show Gist options
  • Select an option

  • Save SametSahin10/2555265b1ed338cea85dc96ce9691041 to your computer and use it in GitHub Desktop.

Select an option

Save SametSahin10/2555265b1ed338cea85dc96ce9691041 to your computer and use it in GitHub Desktop.
while IFS= read -r ID; do
[ -z "$ID" ] && continue
gh api graphql -f query='mutation($t:ID!){resolveReviewThread(input:{threadId:$t}){thread{isResolved}}}' -F t="$ID" > /dev/null && echo "resolved $ID"
done < <(gh api graphql -f query='{ repository(owner: "OWNER", name: "REPO") { pullRequest(number: NUMBER) { reviewThreads(first: 100) { nodes { id isResolved comments(first: 1) { nodes { author { login } } } } } } } }' --jq '.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false and .comments.nodes[0].author.login == "copilot-pull-request-reviewer") | .id')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment