Slash Commands
The run
command was introduced in GitLab Ultimate 10.6. Moved to GitLab Core in 11.9.
Slash commands in Mattermost and Slack allow you to control GitLab and view GitLab content right inside your chat client, without having to leave it. For Slack, this requires an integration configuration. Simply type the command as a message in your chat client to activate it.
Commands are scoped to a project, with a trigger term that is specified during configuration.
We suggest you use the project name as the trigger term for simplicity and clarity.
Taking the trigger term as project-name
, the commands are:
Command | Effect |
---|---|
/project-name help
| Shows all available slash commands |
/project-name issue new <title> <shift+return> <description>
| Creates a new issue with title <title> and description <description>
|
/project-name issue show <id>
| Shows the issue with id <id>
|
/project-name issue close <id>
| Closes the issue with id <id>
|
/project-name issue search <query>
| Shows up to 5 issues matching <query>
|
/project-name issue move <id> to <project>
| Moves issue ID <id> to <project>
|
/project-name issue comment <id> <shift+return> <comment>
| Adds a new comment to an issue with id <id> and comment body <comment>
|
/project-name deploy <from> to <to>
| Deploy from the <from> environment to the <to> environment
|
/project-name run <job name> <arguments>
| Execute ChatOps job <job name> on master
|
Note that if you are using the GitLab Slack application for
your GitLab.com projects, you need to add the gitlab
keyword at the beginning of the command.
Issue commands
It is possible to create new issue, display issue details and search up to 5 issues.
Deploy command
In order to deploy to an environment, GitLab will try to find a deployment manual action in the pipeline.
If there is only one action for a given environment, it is going to be triggered. If there is more than one action defined, GitLab will try to find an action which name equals the environment name we want to deploy to.
Command will return an error when no matching action has been found.
Help and feedback
If there's something you don't like about this feature
To propose functionality that GitLab does not yet offer
To further help GitLab in shaping new features
If you didn't find what you were looking for
If you want help with something very specific to your use case, and can use some community support
POST ON GITLAB FORUM
If you have problems setting up or using this feature (depending on your GitLab subscription)
REQUEST SUPPORT
To view all GitLab tiers and features or to upgrade
If you want to try all features available in GitLab.com
If you want to try all features available in GitLab self-managed
If you spot an error or a need for improvement and would like to fix it yourself in a merge request
EDIT THIS PAGE
If you would like to suggest an improvement to this doc