Scroll to navigation

GH-PR-COMMENT(1) GitHub CLI manual GH-PR-COMMENT(1)

NAME

gh-pr-comment - Add a comment to a pull request

SYNOPSIS

gh pr comment [<number> | <url> | <branch>] [flags]

DESCRIPTION

Add a comment to a GitHub pull request.

Without the body text supplied through flags, the command will interactively prompt for the comment text.

OPTIONS

The comment body text

Read body text from file (use "-" to read from standard input)

Edit the last comment of the same author

Skip prompts and open the text editor to write the body in

Open the web browser to write the comment

OPTIONS INHERITED FROM PARENT COMMANDS

Select another repository using the [HOST/]OWNER/REPO format

EXIT CODES

0: Successful execution

1: Error

2: Command canceled

4: Authentication required

NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.

EXAMPLE

$ gh pr comment 13 --body "Hi from GitHub CLI"

SEE ALSO

gh-pr(1)

Sep 2024 GitHub CLI v2.57.0