2020-10-29 11:09:12 -04:00
---
2020-11-27 13:09:52 -05:00
stage: Create
group: Ecosystem
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
---
2017-05-31 01:50:53 -04:00
# Slash Commands
2020-02-06 10:09:11 -05:00
> The `run` command was [introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/4466) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 10.6. [Moved](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/24780) to [GitLab Core](https://about.gitlab.com/pricing/) in 11.9.
2019-02-20 22:34:42 -05:00
2021-01-27 19:09:33 -05:00
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 ](../user/project/integrations/slack_slash_commands.md ). Type the command as a message in your chat client to activate it.
2017-05-31 01:50:53 -04:00
2017-07-28 05:09:12 -04:00
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:
2017-05-31 01:50:53 -04:00
| 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>` |
2020-05-07 02:09:38 -04:00
| `/project-name issue show <id>` | Shows the issue with ID `<id>` |
| `/project-name issue close <id>` | Closes the issue with ID `<id>` |
2017-05-31 01:50:53 -04:00
| `/project-name issue search <query>` | Shows up to 5 issues matching `<query>` |
2018-03-12 11:29:45 -04:00
| `/project-name issue move <id> to <project>` | Moves issue ID `<id>` to `<project>` |
2020-05-07 02:09:38 -04:00
| `/project-name issue comment <id> <shift+return> <comment>` | Adds a new comment to an issue with ID `<id>` and comment body `<comment>` |
2017-05-31 01:50:53 -04:00
| `/project-name deploy <from> to <to>` | Deploy from the `<from>` environment to the `<to>` environment |
2019-02-20 22:34:42 -05:00
| `/project-name run <job name> <arguments>` | Execute [ChatOps ](../ci/chatops/README.md ) job `<job name>` on `master` |
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
It is possible to create new issue, display issue details and search up to 5 issues.
## Deploy command
2020-11-19 13:09:13 -05:00
In order 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
2020-11-19 13:09:13 -05:00
If there is only one action for a given environment, it is triggered.
If there is more than one action defined, GitLab tries to find an action
2017-07-28 05:09:12 -04:00
which name equals the environment name we want to deploy to.
2020-11-19 13:09:13 -05:00
The command returns an error when no matching action has been found.