Skip to content

ghpr comment resolve

ghpr comment resolve - resolve a comment thread

Terminal window
ghpr comment resolve <pr> <thread-id> [options]

Mark a review comment thread as resolved in the GitHub UI. This uses the GitHub GraphQL API since the REST API does not support thread resolution.

ArgumentRequiredDescription
<pr>YesPull request number
<thread-id>YesThread ID with PRRT_ prefix (from comment list output)
OptionDescription
-t, --token <token>GitHub personal access token
-r, --repo <owner/repo>Repository in owner/repo format
CodeMeaning
0Thread resolved successfully
3Error (API error, auth error, invalid thread ID)
Terminal window
ghpr comment resolve 123 PRRT_UHJQmV2aWV3VGhyZWFkOjE2NTQzMjE=
Terminal window
# Get IDs from comment list
COMMENT_ID=12345678
THREAD_ID=PRRT_UHJQmV2aWV3VGhyZWFkOjE2NTQzMjE=
# Reply first, then resolve
ghpr comment reply 123 $COMMENT_ID "Fixed in latest commit"
ghpr comment resolve 123 $THREAD_ID
Terminal window
ghpr comment list 123 --unresolved --format json | \
jq -r '.[].threadId' | \
while read thread_id; do
ghpr comment resolve 123 "$thread_id"
done
  • Must use the PRRT_ prefixed thread ID, not the numeric comment ID
  • The thread ID is shown in ghpr comment list output
  • The PR number and repo options are for context; they can be omitted if the thread ID is globally unique