GitLab quick actions

Quick actions are text-based shortcuts for common actions that are usually done by selecting buttons or dropdowns in the GitLab user interface. You can enter these commands in the descriptions or comments of issues, epics, merge requests, and commits. Quick actions are executed from both new comments and description, and when you edit existing ones.

Many quick actions are context-aware, requiring certain conditions be met. For example, to remove an issue due date with /remove_due_date, the issue must have a due date set.

Be sure to enter each quick action on a separate line to allow GitLab to properly detect and execute the commands.

Parameters

Many quick actions require a parameter. For example, the /assign quick action requires a username. GitLab uses autocomplete characters with quick actions to help users enter parameters, by providing a list of available values.

If you manually enter a parameter, it must be enclosed in double quotation marks ("), unless it contains only these characters:

  • ASCII letters
  • Numbers (0-9)
  • Underscore (_), hyphen (-), question mark (?), dot (.), ampersand (&) or at (@)

Parameters are case-sensitive. Autocomplete handles this, and the insertion of quotation marks, automatically.

Issues, merge requests, and epics

The following quick actions are applicable to descriptions, discussions, and threads. Some quick actions might not be available to all subscription tiers.

CommandIssueMerge requestEpicAction
/add_contacts [contact:email1@example.com] [contact:email2@example.com] Yes No NoAdd one or more active CRM contacts (introduced in GitLab 14.6).
/approve No Yes NoApprove the merge request.
/assign @user1 @user2 Yes Yes NoAssign one or more users.
/assign me Yes Yes NoAssign yourself.
/assign_reviewer @user1 @user2 or /reviewer @user1 @user2 or /request_review @user1 @user2 No Yes NoAssign one or more users as reviewers.
/assign_reviewer me or /reviewer me or /request_review me No Yes NoAssign yourself as a reviewer.
/award :emoji: Yes Yes YesToggle an emoji reaction.
/blocked_by <issue1> <issue2> Yes No NoMark the issue as blocked by other issues. The <issue> value should be in the format of #issue, group/project#issue, or the full issue URL. (Introduced in GitLab 16.0).
/blocks <issue1> <issue2> Yes No NoMark the issue as blocking other issues. The <issue> value should be in the format of #issue, group/project#issue, or the full issue URL. (Introduced in GitLab 16.0).
/cc @user Yes Yes YesMention a user. In GitLab 15.0 and later, this command performs no action. You can instead type CC @user or only @user. In GitLab 14.9 and earlier, mentioning a user at the start of a line created a specific type of to-do item notification.
/child_epic <epic> No No YesAdd child epic to <epic>. The <epic> value should be in the format of &epic, group&epic, or a URL to an epic.
/clear_health_status Yes No NoClear health status (introduced in GitLab 14.7).
/clear_weight Yes No NoClear weight.
/clone <path/to/project> [--with_notes] Yes No NoClone the issue to given project, or the current one if no arguments are given. Copies as much data as possible as long as the target project contains equivalent objects like labels, milestones, or epics. Does not copy comments or system notes unless --with_notes is provided as an argument.
/close Yes Yes YesClose.
/confidential Yes No YesMark issue or epic as confidential. Support for epics introduced in GitLab 15.6.
/copy_metadata <!merge_request> Yes Yes NoCopy labels and milestone from another merge request in the project.
/copy_metadata <#issue> Yes Yes NoCopy labels and milestone from another issue in the project.
/create_merge_request <branch name> Yes No NoCreate a new merge request starting from the current issue.
/done Yes Yes YesMark to-do item as done.
/draft No Yes NoSet the draft status.
/due <date> Yes No NoSet due date. Examples of valid <date> include in 2 days, this Friday and December 31st. See Chronic for more examples.
/duplicate <#issue> Yes No NoClose this issue. Mark as a duplicate of, and related to, issue <#issue>.
/epic <epic> Yes No NoAdd to epic <epic>. The <epic> value should be in the format of &epic, group&epic, or a URL to an epic.
/estimate <time> or /estimate_time <time> Yes Yes NoSet time estimate. For example, /estimate 1mo 2w 3d 4h 5m. For more information, see Time tracking. Alias /estimate_time introduced in GitLab 15.6.
/health_status <value> Yes No NoSet health status. Valid options for <value> are on_track, needs_attention, and at_risk (introduced in GitLab 14.7).
/invite_email email1 email2 Yes No NoAdd up to six email participants. This action is behind feature flag issue_email_participants and is not yet supported in issue templates.
/iteration *iteration:"iteration name" Yes No NoSet iteration. For example, to set the Late in July iteration: /iteration *iteration:"Late in July".
/label ~label1 ~label2 or /labels ~label1 ~label2 Yes Yes YesAdd one or more labels. Label names can also start without a tilde (~), but mixed syntax is not supported.
/link Yes No NoAdd a link and description to linked resources in an incident (introduced in GitLab 15.5).
/lock Yes Yes NoLock the discussions.
/merge No Yes NoMerge changes. Depending on the project setting, this may be when the pipeline succeeds, or adding to a Merge Train.
/milestone %milestone Yes Yes NoSet milestone.
/move <path/to/project> Yes No NoMove this issue to another project. Be careful when moving an issue to a project with different access rules. Before moving the issue, make sure it does not contain sensitive data.
/page <policy name> Yes No NoStart escalations for the incident (introduced in GitLab 14.9).
/parent_epic <epic> No No YesSet parent epic to <epic>. The <epic> value should be in the format of &epic, group&epic, or a URL to an epic.
/promote_to_incident Yes No NoPromote issue to incident (introduced in GitLab 14.5). In GitLab 15.8 and later, you can also use the quick action when creating a new issue.
/promote Yes No NoPromote issue to epic.
/publish Yes No NoPublish issue to an associated Status Page.
/ready No Yes NoSet the ready status (Introduced in GitLab 15.1).
/reassign @user1 @user2 Yes Yes NoReplace current assignees with those specified.
/reassign_reviewer @user1 @user2 No Yes NoReplace current reviewers with those specified.
/rebase No Yes NoRebase source branch. This schedules a background task that attempts to rebase the changes in the source branch on the latest commit of the target branch. If /rebase is used, /merge is ignored to avoid a race condition where the source branch is merged or deleted before it is rebased. If there are merge conflicts, GitLab displays a message that a rebase cannot be scheduled. Rebase failures are displayed with the merge request status.
/relabel ~label1 ~label2 Yes Yes YesReplace current labels with those specified.
/relate #issue1 #issue2 Yes No NoMark issues as related.
/remove_child_epic <epic> No No YesRemove child epic from <epic>. The <epic> value should be in the format of &epic, group&epic, or a URL to an epic.
/remove_contacts [contact:email1@example.com] [contact:email2@example.com] Yes No NoRemove one or more CRM contacts (introduced in GitLab 14.6).
/remove_due_date Yes No NoRemove due date.
/remove_epic Yes No NoRemove from epic.
/remove_estimate or /remove_time_estimate Yes Yes NoRemove time estimate. Alias /remove_time_estimate introduced in GitLab 15.6.
/remove_iteration Yes No NoRemove iteration.
/remove_milestone Yes Yes NoRemove milestone.
/remove_parent_epic No No YesRemove parent epic from epic.
/remove_time_spent Yes Yes NoRemove time spent.
/remove_zoom Yes No NoRemove Zoom meeting from this issue.
/reopen Yes Yes YesReopen.
/severity <severity> Yes No NoSet the severity. Issue type must be Incident. Options for <severity> are S1S4, critical, high, medium, low, unknown. Introduced in GitLab 14.2.
/shrug <comment> Yes Yes YesAppend the comment with ¯\_(ツ)_/¯.
/spend <time> [<date>] or /spend_time <time> [<date>] Yes Yes NoAdd or subtract spent time. Optionally, specify the date that time was spent on. For example, /spend 1mo 2w 3d 4h 5m 2018-08-26 or /spend -1h 30m. For more information, see Time tracking. Alias /spend_time introduced in GitLab 15.6.
/submit_review No Yes NoSubmit a pending review.
/subscribe Yes Yes YesSubscribe to notifications.
/tableflip <comment> Yes Yes YesAppend the comment with (╯°□°)╯︵ ┻━┻.
/target_branch <local branch name> No Yes NoSet target branch.
/timeline <timeline comment> \| <date(YYYY-MM-DD)> <time(HH:MM)> Yes No NoAdd a timeline event to this incident. For example, /timeline DB load spiked \| 2022-09-07 09:30. (introduced in GitLab 15.4).
/title <new title> Yes Yes YesChange title.
/todo Yes Yes YesAdd a to-do item.
/unapprove No Yes NoUnapprove the merge request. (introduced in GitLab 14.3).
/unassign @user1 @user2 Yes Yes NoRemove specific assignees.
/unassign_reviewer @user1 @user2 or /remove_reviewer @user1 @user2 No Yes NoRemove specific reviewers.
/unassign_reviewer me No Yes NoRemove yourself as a reviewer.
/unassign_reviewer or /remove_reviewer No Yes NoRemove all reviewers.
/unassign No Yes NoRemove all assignees.
/unlabel ~label1 ~label2 or /remove_label ~label1 ~label2 Yes Yes YesRemove specified labels.
/unlabel or /remove_label Yes Yes YesRemove all labels.
/unlink <issue> Yes No NoRemove link with to the provided issue. The <issue> value should be in the format of #issue, group/project#issue, or the full issue URL. (Introduced in GitLab 16.1).
/unlock Yes Yes NoUnlock the discussions.
/unsubscribe Yes Yes YesUnsubscribe from notifications.
/weight <value> Yes No NoSet weight. Valid values are integers like 0, 1, or 2.
/zoom <Zoom URL> Yes No NoAdd a Zoom meeting to this issue or incident. In GitLab 15.3 and later users on GitLab Premium can add a short description when adding a Zoom link to an incident.

Work items

Executing quick actions from comments introduced in GitLab 15.10.

Work items in GitLab include tasks and OKRs. The following quick actions can be applied through the description field when editing or commenting on work items.

CommandTaskObjectiveKey ResultAction
/assign @user1 @user2 Yes Yes YesAssign one or more users.
/assign me Yes Yes YesAssign yourself.
/cc @user Yes Yes YesMention a user. In GitLab 15.0 and later, this command performs no action. You can instead type CC @user or only @user. In GitLab 14.9 and earlier, mentioning a user at the start of a line creates a specific type of to-do item notification.
/clear_health_status Yes Yes YesClear health status.
/clear_weight Yes No NoClear weight.
/close Yes Yes YesClose.
/done Yes Yes YesMark to-do item as done. Introduced in GitLab 16.2.
/due <date> Yes No YesSet due date. Examples of valid <date> include in 2 days, this Friday and December 31st.
/health_status <value> Yes Yes YesSet health status. Valid options for <value> are on_track, needs_attention, or at_risk.
/label ~label1 ~label2 or /labels ~label1 ~label2 Yes Yes YesAdd one or more labels. Label names can also start without a tilde (~), but mixed syntax is not supported.
/promote_to <type> Yes No YesPromotes work item to specified type. Available options for <type>: issue (promote a task) or objective (promote a key result). Introduced in GitLab 16.1.
/reassign @user1 @user2 Yes Yes YesReplace current assignees with those specified.
/relabel ~label1 ~label2 Yes Yes YesReplace current labels with those specified.
/remove_due_date Yes No YesRemove due date.
/reopen Yes Yes YesReopen.
/shrug <comment> Yes Yes YesAppend the comment with ¯\_(ツ)_/¯.
/tableflip <comment> Yes Yes YesAppend the comment with (╯°□°)╯︵ ┻━┻.
/title <new title> Yes Yes YesChange title.
/todo Yes Yes YesAdd a to-do item. Introduced in GitLab 16.2.
/type Yes Yes YesConverts work item to specified type. Available options for <type> include issue, task, objective and key result. Introduced in GitLab 16.0.
/unassign @user1 @user2 Yes Yes YesRemove specific assignees.
/unassign No Yes YesRemove all assignees.
/unlabel ~label1 ~label2 or /remove_label ~label1 ~label2 Yes Yes YesRemove specified labels.
/unlabel or /remove_label Yes Yes YesRemove all labels.
/weight <value> Yes No NoSet weight. Valid options for <value> include 0, 1, and 2.

Commit messages

The following quick actions are applicable for commit messages:

CommandAction
/tag v1.2.3 <message>Tags the commit with an optional message.

Troubleshooting

Quick action isn’t executed

If you run a quick action, but nothing happens, check if the quick action appears in the autocomplete box as you type it. If it doesn’t, it’s possible that:

  • The feature related to the quick action isn’t available to you based on your subscription tier or user role in the group or project.
  • A required condition for the quick action isn’t met. For example, you’re running /unlabel on an issue without any labels.