2020-10-29 11:09:12 -04:00
---
2021-08-02 11:08:56 -04:00
stage: Ecosystem
group: Integrations
2020-11-26 01:09:20 -05:00
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
2020-10-29 11:09:12 -04:00
---
2021-08-30 17:09:17 -04:00
# Slash commands in Mattermost and Slack **(FREE)**
2017-05-31 01:50:53 -04:00
2022-07-13 11:09:14 -04:00
> [Moved](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/24780) from GitLab Ultimate to GitLab Free in 11.9.
2019-02-20 22:34:42 -05:00
2021-09-02 14:10:52 -04:00
If you want to control and view GitLab content while you're
working in Slack and Mattermost, you can use slash commands.
Type the command as a message in your chat client to activate it.
For Slack, this requires an [integration configuration ](../user/project/integrations/slack_slash_commands.md ).
2017-05-31 01:50:53 -04:00
2021-09-02 14:10:52 -04:00
Slash commands are scoped to a project
and require the trigger command specified during configuration.
2017-07-28 05:09:12 -04:00
2021-09-02 14:10:52 -04:00
We suggest you use the project name as the trigger command for simplicity and clarity.
2017-07-28 05:09:12 -04:00
2021-09-02 14:10:52 -04:00
Assuming `project-name` is the trigger command, the slash commands are:
2017-05-31 01:50:53 -04:00
| Command | Effect |
| ------- | ------ |
2021-09-02 14:10:52 -04:00
| `/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 the issue with ID `<id>` to `<project>` . |
| `/project-name issue comment <id> <shift+return> <comment>` | Adds a new comment with comment body `<comment>` to the issue with ID `<id>` . |
| `/project-name deploy <from> to <to>` | [Deploys ](#deploy-command ) from the `<from>` environment to the `<to>` environment. |
| `/project-name run <job name> <arguments>` | Executes the [ChatOps ](../ci/chatops/index.md ) job `<job name>` on the default branch. |
2017-07-28 05:09:12 -04:00
2021-01-27 19:09:33 -05:00
If you are using the [GitLab Slack application ](../user/project/integrations/gitlab_slack_application.md ) for
your GitLab.com projects, [add the `gitlab` keyword at the beginning of the command ](../user/project/integrations/gitlab_slack_application.md#usage ).
2017-12-04 14:55:16 -05:00
2017-07-28 05:09:12 -04:00
## Issue commands
2021-09-02 14:10:52 -04:00
You can create a new issue, display issue details, and search up to 5 issues.
2017-07-28 05:09:12 -04:00
## Deploy command
2021-01-29 19:09:06 -05:00
To deploy to an environment, GitLab tries to find a deployment
2017-07-28 06:16:07 -04:00
manual action in the pipeline.
2017-07-28 05:09:12 -04:00
2021-01-29 19:09:06 -05:00
If there's only one action for a given environment, it is triggered.
2021-09-02 14:10:52 -04:00
If more than one action is defined, GitLab finds an action
name that equals the environment name to deploy to.
2017-07-28 05:09:12 -04:00
2021-09-02 14:10:52 -04:00
The command returns an error if no matching action is found.