Article version: Enterprise Server 2.14

This version of GitHub Enterprise will be discontinued on This version of GitHub Enterprise was discontinued on 2019-07-12. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise. For help with the upgrade, contact GitHub Enterprise support.

Managing disruptive comments

If you have write permissions to a repository, you can edit or delete comments.

In this article:

People with write access to a repository can edit or delete comments on issues, pull requests, and commits. Organization owners, team maintainers, and the comment author can also edit or delete a comment on a team page.

Anyone with read access to a repository can view a comment's edit history. A person with write access to the repository can delete sensitive information from the edit history. For more information, see "Tracking changes in a comment."

Editing a comment

It's appropriate to edit a comment and remove content that doesn't contribute to the conversation and violates your community's code of conduct.

When you edit a comment, note the location that the content was removed from and optionally, the reason for removing it. The edited dropdown at the top of the comment contains a history of edits showing the user and timestamp for each edit.

Comment with added note that content was redacted

  1. Navigate to the comment you'd like to edit.
  2. In the upper-right corner of the comment, click , then click Edit.
    The horizontal kebab icon and comment moderation menu showing the edit, hide, delete, and report options
  3. In the comment window, delete the content you'd like to remove, then type [REDACTED] to replace it.
    Comment window with redacted content
  4. At the bottom of the comment, type a note indicating that you have edited the comment, and optionally, why you edited the comment.
    Comment window with added note that content was redacted
  5. Click Update comment.

Deleting a comment

Deleting a comment is your last resort as a moderator. It's appropriate to delete a comment if the entire comment adds no constructive content to a conversation and violates your community's code of conduct.

If a comment contains some constructive content that adds to the conversation in the issue or pull request, you can edit the comment instead.

Note: The initial comment (or body) of an issue or pull request can't be deleted. Instead, you can edit issue and pull request bodies to remove unwanted content.

  1. Navigate to the comment you'd like to delete.
  2. In the upper-right corner of the comment, click , then click Delete.
    The horizontal kebab icon and comment moderation menu showing the edit, hide, delete, and report options
  3. Optionally, write a comment noting that you deleted a comment and why.

Ask a human

Can't find what you're looking for?

Contact us