ghpr comment reply
ghpr comment reply - reply to a specific comment thread
SYNOPSIS
Section titled “SYNOPSIS”ghpr comment reply <pr> <comment-id> [text] [options]DESCRIPTION
Section titled “DESCRIPTION”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.
ARGUMENTS
Section titled “ARGUMENTS”| Argument | Required | Description |
|---|---|---|
<pr> | Yes | Pull request number |
<comment-id> | Yes | Numeric comment ID (from comment list output) |
[text] | No | Reply text (reads from stdin if not provided) |
OPTIONS
Section titled “OPTIONS”| Option | Description |
|---|---|
-t, --token <token> | GitHub personal access token |
-r, --repo <owner/repo> | Repository in owner/repo format |
EXIT CODES
Section titled “EXIT CODES”| Code | Meaning |
|---|---|
0 | Reply posted successfully |
3 | Error (API error, auth error, empty text) |
Reply text can be provided via:
- Positional argument - Inline with the command
- Stdin pipe - From echo, cat, or other commands
- File redirect - From a file
Text is trimmed before posting. Empty text is rejected.
EXAMPLES
Section titled “EXAMPLES”Inline Reply
Section titled “Inline Reply”ghpr comment reply 123 12345678 "Fixed in latest commit"Acknowledge Comment
Section titled “Acknowledge Comment”ghpr comment reply 123 12345678 "Will address in follow-up PR"Reply from Stdin
Section titled “Reply from Stdin”echo "Acknowledged" | ghpr comment reply 123 12345678Reply from File
Section titled “Reply from File”cat response.txt | ghpr comment reply 123 12345678Multi-line Reply
Section titled “Multi-line Reply”ghpr comment reply 123 12345678 "Good catch!
I've updated the code to handle this edge case.See commit abc1234."Reply and Resolve
Section titled “Reply and Resolve”# Get both IDs from comment listCOMMENT_ID=12345678THREAD_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 listoutput - To resolve a thread after replying, use
ghpr comment resolvewith the thread ID
SEE ALSO
Section titled “SEE ALSO”- ghpr comment list - List comment threads
- ghpr comment resolve - Resolve a thread