Webhook
User can configure project-level webhooks to let Bytebase post messages to the configured webhook endpoint upon various events.
Supported events
Issue creation
- Post message when issue belonging to the configured project has been created.Issue status change
- Post message when the status of the issue belonging to the configured project has been changed.Issue stage status change
- Post message when issue's enclosing stage status has been changed.Issue task status change
- Post message when issue's enclosing task status has been changed.Issue info change
- Post message when issue's basic info such as assignee, title, description has been changed.Issue comment creation
- Post message when new comment added to the issue.
The following events support sending direct messages/notifications to related users, make sure you have:
- enabled the
Enable direct messages
option to enable this feature. - configured the
IM
integration to send messages to related users.
Issue approval needed
- Post message when issue needs approval.Issue approved
- Post message when issue has been approved.Issue rollout needed
- Post message when issue needs rollout.
Supported webhook endpoints
Slack
Configure sending direct messages to related users
-
Go to https://api.slack.com/apps.
-
Click Create New App.
-
Choose From an app manifest.
-
Pick your workspace to develop the app and click Next.
-
Replace the existing JSON with this manifest content and click Next.
{ "display_information": { "name": "Bytebase Bot" }, "features": { "bot_user": { "display_name": "Bytebase Bot", "always_online": false } }, "oauth_config": { "scopes": { "bot": [ "users:read", "users:read.email", "channels:manage", "groups:write", "im:write", "chat:write", "mpim:write" ] } }, "settings": { "org_deploy_enabled": false, "socket_mode_enabled": false, "token_rotation_enabled": false } }
-
Click Create.
-
Click Install to Workspace and click Allow.
-
Go to Features > OAuth & Permissions and copy the Bot User OAuth Token.
-
Go back to Bytebase and paste the Bot User OAuth Token to the Token field under Integration > IM.
-
Go to Integration > Webhooks in a project, add a webhook, check all the events you want to send direct messages, and click Create.
Discord
Microsoft Teams
DingTalk
Configure sending direct messages to related users
- Go to https://open-dev.dingtalk.com/.
- Select Application Development, click Create Application.
- Select Credentials and Basic Information on the left sidebar. Obtain the Client ID and Client Secret.
- Select Permission Management, grant the following permissions:
qyapi_get_member_by_mobile
qyapi_robot_sendmsg
- Select Add Application Capability, add the Robot capability. Configure the robot, and for Message receiving mode select
Stream mode
. In "Robot Configuration", click Copy RobotCode to obtain the Robot Code. Publish the robot. - Select Version Management and Release. Click Create New Version. Fill in the relevant information, then Save and Directly Publish.
- Go back to Bytebase and fill Client ID, Client Secret and Robot Code fields under Integration > IM.
- Go to Integration > Webhooks in a project, add a webhook, check all the events you want to send direct messages, and click Create.
DingTalk allows to specify a list of keywords in the security setting to protect webhook endpoint. You can add "Bytebase" to that keyword list.
Feishu (Lark)
Feishu (Lark) allows to specify a list of keywords in the security setting to protect webhook endpoint. You can add "Bytebase" to that keyword list.
Configure sending direct notifications to related users
- Go to https://open.feishu.cn/app.
- Click Create Custom App, fill the form and click Create.
- Click Add Features on the left sidebar, add the Bot feature.
- Click Permisions & Scopes on the left sidebar, find and add the following permissions:
contact:user.id:readonly
im:message:send_as_bot
- Click Create Version.
- Configure availability.
- Go back to Bytebase and fill App Id and App Secret fields under Integration > IM.
- Go to Integration > Webhooks in a project, add a webhook, check all the events you want to send direct messages, and click Create.
WeCom
WeCom does not provide its own official guide. Please follow this similar setup from Tencent Cloud instead.
Configure sending direct messages to related users
- Go to https://work.weixin.qq.com/wework_admin/frame#apps.
- Click the tab My Company, and then you can find Company ID in the Company Information.
- Click the tab App Management, and choose Create an app under Self-built.
- Open the app,
- Find AgentId and Secret.
- Configure Allowed users.
- Configure Company's Trusted IP to your Bytebase instance IP.
- Make sure the user's email in Bytebase is the same as the user's email (not External account) in WeCom.
- Go back to Bytebase and fill Corp Id, Agent Id and Secret fields under Integration > IM.
- Go to Integration > Webhooks in a project, add a webhook, check all the events you want to send direct messages, and click Create.