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

# [NAME](#NAME)

gh-discussion-comment - Add, edit, or delete a comment or a reply on a discussion (preview)

# [SYNOPSIS](#SYNOPSIS)

**gh discussion comment {&lt;number&gt; | &lt;discussion-url&gt; | &lt;comment-id&gt; | &lt;comment-url&gt;} \[flags]**

# [DESCRIPTION](#DESCRIPTION)

Manage comments or replies on a GitHub discussion.

The positional argument can be a discussion number or URL (to add a new top-level comment), or a comment node ID or comment URL (to reply, edit, or delete that comment).

When the argument is a discussion number or URL, the default action is to add a new top-level comment. Likewise, if the argument is a comment URL or ID the default action is to add a reply.

Use **--edit** to update the comment/reply body, or **--delete** to remove it.

The body can be supplied via **--body**, **--body-file**, or interactively through an editor.

# [OPTIONS](#OPTIONS)

[**-b**, **--body** **&lt;string&gt;**](#b)

Comment body text

[**-F**, **--body-file** **&lt;string&gt;**](#F)

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

[**--delete**](#delete)

Delete the specified comment

[**--edit**](#edit)

Edit the specified comment

[**-R**, **--repo** **&lt;\[HOST/\]OWNER/REPO&gt;**](#R)

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

[**--yes**](#yes)

Skip the delete confirmation prompt

# [EXIT CODES](#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](#EXAMPLE)

```
# Add a top-level comment to discussion #123
$ gh discussion comment 123 --body 'Thanks'
# Reply to a comment using its URL
$ gh discussion comment 'https://github.com/OWNER/REPO/discussions/123#discussioncomment-456' --body 'Thanks'
# Reply to a comment using its node ID
$ gh discussion comment DC_abc123 --body 'Thanks'
# Edit a comment/reply
$ gh discussion comment 'https://github.com/OWNER/REPO/discussions/123#discussioncomment-456' --edit --body 'Thanks'
# Delete a comment/reply
$ gh discussion comment 'https://github.com/OWNER/REPO/discussions/123#discussioncomment-456' --delete
# Delete a comment/reply without confirmation prompt
$ gh discussion comment 'https://github.com/OWNER/REPO/discussions/123#discussioncomment-456' --delete --yes
```

# [SEE ALSO](#SEE_ALSO)

[**gh-discussion(1)**](/man/os/gh/gh-discussion.1)

Oct 2026

---

Document: gh-discussion-comment(1) from gh 2.102.0-r1 (Chainguard OS)
Source: https://github.com/cli/cli
