Help us learn about your current experience with the documentation. Take the survey.
Slack 斜杠命令
- Tier: Free, Premium, Ultimate
- Offering: GitLab Self-Managed, GitLab Dedicated
此功能仅在 GitLab 自托管上可配置。 对于 GitLab.com,请使用 GitLab for Slack 应用。
您可以使用 斜杠命令 在 Slack 聊天环境中执行常见的 GitLab 操作, 例如创建 issue。要在 Slack 中运行斜杠命令,您必须同时配置 Slack 和 GitLab。
GitLab 还可以将事件(如 issue created)作为 Slack 通知 的一部分发送到 Slack。
有关可用斜杠命令的列表,请参见 斜杠命令。
配置集成
Slack 斜杠命令的作用范围是项目。要配置 Slack 斜杠命令:
- 在左侧边栏,选择 Search or go to 并找到您的项目。
- 选择 Settings > Integrations。
- 选择 Slack slash commands 并保持此浏览器标签页打开。
- 在新的浏览器标签页中,登录 Slack 并 添加新的斜杠命令。
- 为斜杠命令输入触发名称。您可以使用项目名称。
- 选择 Add Slash Command Integration。
- 在 Slack 浏览器标签页中:
- 使用 GitLab 浏览器标签页中的信息填写字段。
- 选择 Save Integration 并复制 Token 值。
- 在 GitLab 浏览器标签页中:
- 粘贴 token 并确保选中 Active 复选框。
- 选择 Save changes。
现在您可以在 Slack 中运行斜杠命令了。