Skip to content

Comment templates

DETAILS: Tier: Free, Premium, Ultimate Offering: GitLab.com, Self-managed, GitLab Dedicated

FLAG: On self-managed GitLab, by default group-level saved replies are not available. To make them available, an administrator can enable the feature flag named group_saved_replies_flag. On GitLab.com, this feature is available. On GitLab Dedicated, this feature is not available.

With comment templates, create and reuse text for any text area in:

  • Merge requests, including diffs.
  • Issues, including design management comments.
  • Epics.
  • Work items.

Comment templates can be small, like approving a merge request and unassigning yourself from it, or large, like chunks of boilerplate text you use frequently:

Comment templates dropdown list

Use comment templates in a text area

To include the text of a comment template in your comment:

  1. In the editor toolbar for your comment, select Comment templates ({comment-lines}).
  2. Select your desired comment template.

Create comment templates

You can create comment templates for your own use, or to share with all members of a group.

To create a comment template for your own use:

  1. On the left sidebar, select your avatar.
  2. From the dropdown list, select Preferences.
  3. On the left sidebar, select Comment templates ({comment-lines}).
  4. Select Add new.
  5. Provide a Name for your comment template.
  6. Enter the Content of your reply. You can use any formatting you use in other GitLab text areas.
  7. Select Save, and the page reloads with your comment template shown.

For a group

DETAILS: Tier: Premium, Ultimate

To create a comment template shared with all members of a group:

  1. In the editor toolbar for a comment, select Comment templates ({comment-lines}), then select Manage group comment templates.
  2. Select Add new.
  3. Provide a Name for your comment template.
  4. Enter the Content of your reply. You can use any formatting you use in other GitLab text areas.
  5. Select Save, and the page reloads with your comment template shown.

View comment templates

To see existing comment templates:

  1. On the left sidebar, select your avatar.
  2. From the dropdown list, select Preferences.
  3. On the left sidebar, select Comment templates ({comment-lines}).
  4. Scroll to Comment templates.

For a group

DETAILS: Tier: Premium, Ultimate

  1. In the editor toolbar for a comment, select Comment templates ({comment-lines}).
  2. Select Manage group comment templates.

Edit or delete comment templates

To edit or delete an existing comment template:

  1. On the left sidebar, select your avatar.
  2. From the dropdown list, select Preferences.
  3. On the left sidebar, select Comment templates ({comment-lines}).
  4. Scroll to Comment templates, and identify the comment template you want to edit.
  5. To edit, select Edit ({pencil}).
  6. To delete, select Delete ({remove}), then select Delete again on the dialog.

For a group

DETAILS: Tier: Premium, Ultimate

  1. In the editor toolbar for a comment, select Comment templates ({comment-lines}), then select Manage group comment templates.
  2. To edit, select Edit ({pencil}).
  3. To delete, select Delete ({remove}), then select Delete again on the dialog.