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.
Work items
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.
Commit messages
The following quick actions are applicable for commit messages:
Command | Action |
---|---|
/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 for 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.