All commands accept pull request selectors as either:
- a pull request URL (
https://github.com/owner/repo/pull/123) - a pull request number when combined with
-R owner/repo
Unless stated otherwise, commands emit JSON only. Optional fields are omitted instead of serializing as null. Array responses default to [].
- Purpose: Open (or resume) a pending review on the head commit.
- Inputs:
- Optional pull request selector argument.
--repo/--prflags when not using the selector shorthand.--committo pin the pending review to a specific commit SHA (defaults to the pull request head).
- Output schema:
ReviewState— required fieldsidandstate; optionalsubmitted_at.
gh monitor review --start -R owner/repo 42
{
"id": "PRR_...",
"state": "PENDING"
}- Purpose: Attach an inline thread to an existing pending review.
- Inputs:
--review-id(required): Review node ID (must start withPRR_). Numeric IDs are rejected.--path,--line,--body(required).--body-file: Read body from a file instead of--body(use"-"for stdin). Mutually exclusive with--body.--side,--start-line,--start-sideto describe diff positioning.
- Output schema:
ReviewThread— required fieldsid,path,is_outdated; optionalline.
gh monitor review --add-comment \
--review-id PRR_... \
--path internal/service.go \
--line 42 \
--body "nit: prefer helper" \
-R owner/repo 42
{
"id": "PRRT_...",
"path": "internal/service.go",
"is_outdated": false,
"line": 42
}- Purpose: Edit/update the body of a comment in a pending review.
- Inputs:
--comment-id(required): Comment node ID (must start withPRRC_).--body(required): New comment text.
- Output schema: Status payload
{"status": "Comment updated successfully"}.
gh monitor review --edit-comment \
--comment-id PRRC_... \
--body "Updated: use helper function here" \
-R owner/repo 42
{
"status": "Comment updated successfully"
}Note: This only works on comments in pending reviews. Once a review is submitted, comments cannot be edited.
- Purpose: Delete a comment from a pending review.
- Inputs:
--comment-id(required): Comment node ID (must start withPRRC_).
- Output schema: Status payload
{"status": "Comment deleted successfully"}.
gh monitor review --delete-comment \
--comment-id PRRC_... \
-R owner/repo 42
{
"status": "Comment deleted successfully"
}Note: This only works on comments in pending reviews. Once a review is submitted, comments cannot be deleted.
- Purpose: Emit a consolidated snapshot of reviews, inline comments, and replies.
- Inputs:
- Optional pull request selector argument (URL or number with
--repo). --repo/--prflags when not providing the positional number.- Filters:
--reviewer,--states,--unresolved,--not_outdated,--tail. --include-comment-node-idto surface comment IDs on parent comments and replies.
- Optional pull request selector argument (URL or number with
- Output shape:
gh monitor review view --reviewer octocat --states CHANGES_REQUESTED -R owner/repo 42
{
"reviews": [
{
"id": "PRR_...",
"state": "CHANGES_REQUESTED",
"author_login": "octocat",
"comments": [
{
"thread_id": "PRRT_...",
"path": "internal/service.go",
"line": 42,
"author_login": "octocat",
"body": "nit: prefer helper",
"created_at": "2025-12-03T10:00:00Z",
"is_resolved": false,
"is_outdated": false,
"thread_comments": []
}
]
}
]
}- Purpose: Finalize a pending review as COMMENT, APPROVE, or REQUEST_CHANGES.
- Inputs:
--review-id(required): Review node ID (must start withPRR_). Numeric IDs are rejected.--event(required): One ofCOMMENT,APPROVE,REQUEST_CHANGES.--body: Optional message. GitHub requires a body forREQUEST_CHANGES.--body-file: Read body from a file instead of--body(use"-"for stdin). Mutually exclusive with--body.
- Output schema: Status payload
{"status": "…"}. On errors, the command emits{ "status": "Review submission failed", "errors": [...] }and exits non-zero.
gh monitor review --submit \
--review-id PRR_... \
--event REQUEST_CHANGES \
--body "Please cover edge cases" \
-R owner/repo 42
{
"status": "Review submitted successfully"
}- Purpose: Reply to a review thread.
- Inputs:
--thread-id(required): Review thread identifier (PRRT_…).--review-id: Review identifier when replying inside your pending review (PRR_…).--body(required, or use--body-file).--body-file: Read reply text from a file instead of--body(use"-"for stdin). Mutually exclusive with--body.
- Output schema:
ReplyMinimal.
gh monitor comments reply \
--thread-id PRRT_... \
--body "Ack" \
-R owner/repo 42
{
"comment_node_id": "PRRC_..."
}- Purpose: Enumerate review threads for a pull request.
- Inputs:
--unresolvedto filter unresolved threads only.--mineto include only threads you can resolve or participated in.
- Output schema: Array of
ThreadSummary.
gh monitor threads list --unresolved --mine -R owner/repo 42
[
{
"thread_id": "R_...",
"is_resolved": false,
"updated_at": "2024-12-19T18:40:11Z",
"path": "internal/service.go",
"line": 42,
"is_outdated": false
}
]- Purpose: Show the full conversation and metadata for one or more review threads by thread ID.
- Inputs:
- One or more
--thread-idvalues. - Pull request selector (
-R owner/repo <pr-number>or PR URL).
- One or more
- Output schema: Array of
ThreadDetail.
gh monitor threads view PRRT_... PRRT_... -R owner/repo 42
[
{
"thread_id": "PRRT_...",
"is_resolved": false,
"is_outdated": false,
"path": "internal/service.go",
"line": 42,
"comments": [
{
"author_login": "octocat",
"body": "nit: prefer helper",
"created_at": "2025-12-03T10:00:00Z"
},
{
"author_login": "squirrel289",
"body": "Fixed in latest commit.",
"created_at": "2025-12-03T11:00:00Z"
}
]
}
]- Purpose: Resolve or reopen a review thread.
- Inputs:
--thread-id(required): Review thread node ID (PRRT_…).
- Output schema:
ThreadMutationResult.
gh monitor threads resolve --thread-id PRRT_... -R owner/repo 42
{
"thread_node_id": "PRRT_...",
"is_resolved": true
}threads unresolve emits the same schema with is_resolved set to false.
- Purpose: Add a reaction to any reactable GitHub node (review comment, issue comment, PR review body, etc.).
- Inputs:
- Node ID (positional argument): GraphQL node ID of the target object.
--type(required): Reaction type. Valid values:thumbs_up,thumbs_down,laugh,hooray,confused,heart,rocket,eyes.
- Output schema: Status payload with node_id, reaction, and status.
gh monitor react PRRC_... --type thumbs_up
{
"node_id": "PRRC_...",
"reaction": "thumbs_up",
"status": "added"
}