gh pr comment
Comment on a pull request
What it does
gh pr comment adds a message to a pull request's conversation. Pass the text with --body; without it an editor opens, and --web opens the form in the browser.
--edit-last edits your last comment instead of adding a new one. A comment is not a review: it approves nothing and blocks no merge.
Syntax
gh pr comment <number> --body "<text>"
gh pr comment <number> --edit-lastExamples
Leave the comment "LGTM" on pull request 42
gh pr comment 42 --body "LGTM"same as:
gh pr comment 42 -b "LGTM",gh pr comment 42 --body 'LGTM',gh pr comment 42 -b 'LGTM'pr comment 42— a comment in the PR conversation--body "LGTM"— the text; without the flag an editor opens
Related commands
- gh pr review — Approve a pull request or ask for changes
- gh issue comment — Comment on an issue
- gh pr view — Read a pull request: description, status and reviews