summaryrefslogtreecommitdiff
path: root/doc/user/project/integrations/gitlab_slack_application.md
blob: 2dae02dc0936b0d76a0f0aa71b9942a78d842530 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
---
stage: Ecosystem
group: Integrations
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
---

# GitLab Slack application **(FREE SAAS)**

NOTE:
The GitLab Slack application is only configurable for GitLab.com. It will **not**
work for on-premises installations where you can configure the
[Slack slash commands](slack_slash_commands.md) service instead. We're planning
to make this configurable for all GitLab installations, but there's
no ETA - see [#28164](https://gitlab.com/gitlab-org/gitlab/-/issues/28164).

Slack provides a native application which you can enable via your project's
integrations on GitLab.com.

## Slack App Directory

The simplest way to enable the GitLab Slack application for your workspace is to
install the [GitLab application](https://slack-platform.slack.com/apps/A676ADMV5-gitlab) from
the [Slack App Directory](https://slack.com/apps).

Clicking install takes you to the [GitLab Slack application landing page](https://gitlab.com/-/profile/slack/edit)
where you can select a project to enable the GitLab Slack application for.

## Configuration

Alternatively, you can configure the Slack application with a project's
integration settings.

Keep in mind that you must have the appropriate permissions for your Slack
team to be able to install a new application, read more in Slack's
documentation on [Adding an app to your workspace](https://slack.com/help/articles/202035138-Add-apps-to-your-Slack-workspace).

To enable the GitLab service for your Slack team:

1. Go to your project's **Settings > Integration > Slack application** (only
   visible on GitLab.com).
1. Select **Add to Slack**.

That's all! You can now start using the Slack slash commands.

## Create a project alias for Slack

To create a project alias on GitLab.com for Slack integration:

1. Go to your project's home page.
1. Go to **Settings > Integrations** (only visible on GitLab.com)
1. On the **Integrations** page, select **Slack application**.
1. The current **Project Alias**, if any, is displayed. To edit this value,
   select **Edit**.
1. Enter your desired alias, and select **Save changes**.

Some Slack commands require a project alias, and fail with the following error
if the project alias is incorrect or missing from the command:

```plaintext
GitLab error: project or alias not found
```

## Usage

After confirming the installation, you, and everyone else in your Slack team,
can use all the [slash commands](../../../integration/slash_commands.md).

When you perform your first slash command, you are asked to authorize your
Slack user on GitLab.com.

The only difference with the [manually configurable Slack slash commands](slack_slash_commands.md)
is that all the commands should be prefixed with the `/gitlab` keyword.
We are working on making this configurable in the future.

For example, to show the issue number `1001` under the `gitlab-org/gitlab`
project, you would do:

```plaintext
/gitlab gitlab-org/gitlab issue show 1001
```