Comment templates
DETAILS: Tier: Free, Premium, Ultimate Offering: GitLab.com, Self-managed, GitLab Dedicated
- User interface introduced in GitLab 15.10 with a flag named
saved_replies
. Disabled by default. Enabled for GitLab team members only.- Enabled on GitLab.com and self-managed in GitLab 16.0.
- Feature flag
saved_replies
removed in GitLab 16.6.- Group-level saved replies introduced in GitLab 16.11 with a flag named
group_saved_replies_flag
. Disabled by default.- Group-level saved replies enabled on GitLab.com and self-managed in GitLab 16.11.
- Group-level saved replies generally available in GitLab 17.0. Feature flag
group_saved_replies_flag
removed.- Project-level saved replies introduced in GitLab 17.0 with a flag named
project_saved_replies_flag
. Disabled by default.
FLAG:
On self-managed GitLab, by default project-level saved replies are not available.
To make them available, an administrator can enable the feature flag named project_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:
Use comment templates in a text area
To include the text of a comment template in your comment:
- In the editor toolbar for your comment, select Comment templates ({comment-lines}).
- 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:
- On the left sidebar, select your avatar.
- From the dropdown list, select Preferences.
- On the left sidebar, select Comment templates ({comment-lines}).
- Select Add new.
- Provide a Name for your comment template.
- Enter the Content of your reply. You can use any formatting you use in other GitLab text areas.
- 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:
- In the editor toolbar for a comment, select Comment templates ({comment-lines}), then select Manage group comment templates.
- Select Add new.
- Provide a Name for your comment template.
- Enter the Content of your reply. You can use any formatting you use in other GitLab text areas.
- Select Save, and the page reloads with your comment template shown.
For a project
DETAILS: Tier: Premium, Ultimate
To create a comment template shared with all members of a project:
- In the editor toolbar for a comment, select Comment templates ({comment-lines}), then select Manage project comment templates.
- Select Add new.
- Provide a Name for your comment template.
- Enter the Content of your reply. You can use any formatting you use in other GitLab text areas.
- Select Save, and the page reloads with your comment template shown.
View comment templates
To see existing comment templates:
- On the left sidebar, select your avatar.
- From the dropdown list, select Preferences.
- On the left sidebar, select Comment templates ({comment-lines}).
- Scroll to Comment templates.
For a group
DETAILS: Tier: Premium, Ultimate
- In the editor toolbar for a comment, select Comment templates ({comment-lines}).
- Select Manage group comment templates.
For a project
DETAILS: Tier: Premium, Ultimate
- In the editor toolbar for a comment, select Comment templates ({comment-lines}).
- Select Manage project comment templates.
Edit or delete comment templates
To edit or delete an existing comment template:
- On the left sidebar, select your avatar.
- From the dropdown list, select Preferences.
- On the left sidebar, select Comment templates ({comment-lines}).
- Scroll to Comment templates, and identify the comment template you want to edit.
- To edit, select Edit ({pencil}).
- To delete, select Delete ({remove}), then select Delete again on the dialog.
For a group
DETAILS: Tier: Premium, Ultimate
- In the editor toolbar for a comment, select Comment templates ({comment-lines}), then select Manage group comment templates.
- To edit, select Edit ({pencil}).
- To delete, select Delete ({remove}), then select Delete again on the dialog.
For a project
DETAILS: Tier: Premium, Ultimate
- In the editor toolbar for a comment, select Comment templates ({comment-lines}), then select Manage project comment templates.
- To edit, select Edit ({pencil}).
- To delete, select Delete ({remove}), then select Delete again on the dialog.