Skip to content

ghpr comment reply

ghpr comment reply - reply to a specific comment thread

Terminal window
ghpr comment reply <pr> <comment-id> [text] [options]

Post a reply to an existing review comment thread. The reply text can be provided as a positional argument or read from stdin, making it suitable for both interactive use and scripted workflows.

ArgumentRequiredDescription
<pr>YesPull request number
<comment-id>YesNumeric comment ID (from comment list output)
[text]NoReply text (reads from stdin if not provided)
OptionDescription
-t, --token <token>GitHub personal access token
-r, --repo <owner/repo>Repository in owner/repo format
CodeMeaning
0Reply posted successfully
3Error (API error, auth error, empty text)

Reply text can be provided via:

  1. Positional argument - Inline with the command
  2. Stdin pipe - From echo, cat, or other commands
  3. File redirect - From a file

Text is trimmed before posting. Empty text is rejected.

Terminal window
ghpr comment reply 123 12345678 "Fixed in latest commit"
Terminal window
ghpr comment reply 123 12345678 "Will address in follow-up PR"
Terminal window
echo "Acknowledged" | ghpr comment reply 123 12345678
Terminal window
cat response.txt | ghpr comment reply 123 12345678
Terminal window
ghpr comment reply 123 12345678 "Good catch!
I've updated the code to handle this edge case.
See commit abc1234."
Terminal window
# Get both IDs from comment list
COMMENT_ID=12345678
THREAD_ID=PRRT_abc123...
ghpr comment reply 123 $COMMENT_ID "Fixed!"
ghpr comment resolve 123 $THREAD_ID
  • Must use the numeric comment ID, not the PRRT_ prefixed thread ID
  • The comment ID is shown in ghpr comment list output
  • To resolve a thread after replying, use ghpr comment resolve with the thread ID