debian-mirror-gitlab/doc/user/project/integrations/slack_slash_commands.md

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
1.8 KiB
Markdown
Raw Normal View History

2020-10-24 23:57:45 +05:30
---
2021-10-27 15:23:28 +05:30
stage: Ecosystem
group: Integrations
2021-02-22 17:27:13 +05:30
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-24 23:57:45 +05:30
---
2021-03-11 19:13:27 +05:30
# Slack slash commands **(FREE SELF)**
2017-08-17 22:00:37 +05:30
2021-11-11 11:23:49 +05:30
If you want to control and view GitLab content while you're
working in Slack, you can use Slack slash commands.
To use Slack slash commands, you must configure both Slack and GitLab.
2017-08-17 22:00:37 +05:30
2021-11-11 11:23:49 +05:30
GitLab can also send events (for example, `issue created`) to Slack as notifications.
The [Slack notifications service](slack.md) is configured separately.
2019-07-31 22:56:46 +05:30
2021-02-22 17:27:13 +05:30
NOTE:
2021-11-11 11:23:49 +05:30
For GitLab.com, use the [GitLab Slack app](gitlab_slack_application.md) instead.
2017-08-17 22:00:37 +05:30
2021-11-11 11:23:49 +05:30
## Configure GitLab and Slack
2017-08-17 22:00:37 +05:30
2022-06-21 17:19:12 +05:30
Slack slash command integrations
2021-11-11 11:23:49 +05:30
are scoped to a project.
2017-08-17 22:00:37 +05:30
2021-11-11 11:23:49 +05:30
1. In GitLab, on the top bar, select **Menu > Projects** and find your project.
1. On the left sidebar, select **Settings > Integrations**.
1. Select **Slack slash commands**. Leave this browser tab open.
1. Open a new browser tab, sign in to your Slack team, and [start a new Slash Commands integration](https://my.slack.com/services/new/slash-commands).
1. Enter a trigger command. We suggest you use the project name.
Select **Add Slash Command Integration**.
1. Complete the rest of the fields in the Slack configuration page using information from the GitLab browser tab.
In particular, make sure you copy and paste the **URL**.
2017-08-17 22:00:37 +05:30
2021-11-11 11:23:49 +05:30
![Slack setup instructions](img/slack_setup.png)
2017-08-17 22:00:37 +05:30
2021-11-11 11:23:49 +05:30
1. On the Slack configuration page, select **Save Integration** and copy the **Token**.
1. Go back to the GitLab configuration page and paste in the **Token**.
1. Ensure the **Active** checkbox is selected and select **Save changes**.
## Slash commands
You can now use the available [Slack slash commands](../../../integration/slash_commands.md).