使用场景
- 团队中有人新建了
issue
,需要消息提醒。 - 有人发表了评论,需要消息提醒。
- 有人在分支上
push
了新版本的代码…..
总之就是只要有人在GitLab
上有任何新的操作动态,即时向MatterMost
的指定频道发送消息。通知到团队里的其他人。
操作步骤
在MatterMost
的群组里创建新的webhook
从菜单选择集成
->Incoming Webhooks
->Add
,添加新的webhook
。
点击保存
后会生成新的API接口链接,复制该链接。
在GitLab里进行MatterMost Notification的设置
从Settings
->Intergrations
->MatterMost Notification
进入以下设置界面。
- Webhook:填写在MatterMost里创建的webhook链接。
- Username:发送消息的主体名称。
点击Test settings
测试通过之后,点击绿色按钮Save changes
即可保存设置。
如果测试成功,则会收到如下的类似消息。
注意点:
为了显示自定义的消息发送者名称和头像,需要找系统管理员在MatterMost里将以下两个属性值设置为true
。
- Enable integrations to override usernames
- Enable integrations to override profile picture icons
参考文档:MatterMost官方文档