MVC1: Feishu Notification Service
link
showcase video:Problem to solve
Feishu belongs to ByteDance(developed TikTok).
It contains functions like messaging, video conferencing, schedule management, collaborative documents, cloud storage, email, and workflow applications.
Its international version is Lark, more English description.
Feishu's competitor in China is Dingtalk(belonging to Alibaba).
Proposal
User Story
As a developer, I want to receive events from JiHu GitLab e.g. issue created, pipeline failure... in my Feishu conversations so that I can receive these updates in time.
Use Cases
- User chooses to add 极狐GitLab 助手 in Feishu conversation.
- 极狐GitLab 助手 shows up with a message "我是你的极狐GitLab小助手。若有代码变更或者新的议题时间,我会及时通知你。阅读新人指南,可以帮助你更好地使用我哦!" and a guide link(gitlab.cn上的document)
- User follows the guide link to generate a webhook url of 飞书 with command
@极狐GitLab 助手 get_webhook
- 飞书 sends the webhook url to the 飞书 administrator in another conversation
- User opens a 极狐GitLab project Settings - Integration - Feishu Notification Service, inputs the webhook url and other parameters, and chooses Save
- Sends notifications about project events to 飞书 group conversations. How do I set up this service?
- Enable integration:
-
Active
-
- Language:
-
简体中文/English
-
- Trigger:
-
Push -
Issue -
Confidential Issue -
Merge Request -
Note -
Confidential Note -
Tag Push -
Pipeline -
Wiki Page -
Deployment -
Vulnerability -
Alert
-
- Webhook:
- Notify only broken pipelines
- Branches for which notifications are to be sent
- Labels to be notified
- Labels to be notified behavior
- 极狐GitLab 助手 starts to push event messages into the conversation.
Useful Links
Dev updates
- 由于客户在飞书拿不到该公司在飞书的唯一ID,所以极狐很难确定某条通知需要发送给哪个公司的那个群,除非提供一个有点复杂的绑定机制。和彭亮商量过后,决定暂时不做 SaaS 版的飞书集成,只做 Self-Management 版本的
- 飞书通知是免费功能,其中vulnerability类型的通知,在配置页面会提示用户“旗舰版”才能使用,但飞书配置页面不会根据license类型隐藏该配置项,而是vulnerability功能本身是只有在旗舰版才能使用
Acceptance Criteria
- 配置页面根据当前Epic中的Use Case能够配置成功
- 实际使用中根据ChatOps PRD中所有event type消息都能成功发送至飞书群聊聊天窗口
- 该功能在免费版使用成功
- 7月6日ChatOps PRD中新增tag push, push to removed branch, approve MR, unapprove MR, note in snippet这5种event,都要能成功发送至飞书群聊聊天窗口
- 飞书卡片支持多种颜色,我们统一使用3种颜色,规定以下事件的卡片颜色:
- 绿色(Green)代表完成/成功
- push
- push to removed branch
- tag push
- issue&confidential issue open/close
- MR open
- MR merge
- MR approve
- Note & Confidential Note
- Pipeline pass
- Wiki
- Deployment start
- Deployment succeed
- 红色(Red)代表错误/异常
- MR unapprove
- Pipeline fail
- Deployment fail
- Vulnerability detected
- Alert detected
- 灰色(Grey)代表失效
- MR close
- Pipeline cancel
- Deployment cancel
- 绿色(Green)代表完成/成功
- #1414 (closed) 按评论中的proposal完成
由 彭亮 编辑于