Request role
feature is supported by Enterprise Plan which will be needed for this tutorial, other plans only allow the Assign role
feature which is not enough. You may request a trial from here.
Workspace Admin
, and go to IAM & Admin > Users & Groups. Click + Add User, fill in with api-sample
, choose the Workspace DBA
role sufficient for this tutorial and click Confirm.
Sample Project
, click Manage > Members, and assign the service account as Project Owner
which can fit the custom approval set in the previous tutorial.example-slack
code and run itapprove-issue
folder and copy the env-template.local
file to .env.local
..env.local
file.3000
for the example-slack
app8080
for the Bytebase instance
.env.local
file as BB_HOST
.Sample Project
.Slack
webhook, URL as YOUR_3000_FORWARDED_URL/api/bytebase/webhook
.Issue approval needed
as Triggering activities.chat:write
(send message)channels:read
(read channel id for public channel)groups:read
(read channel id for private channel).env.local
file as SLACK_BOT_TOKEN./invite @YOUR_BOT_NAME
.YOUR_3000_FORWARDED_URL/api/slack/interact
. Click Save Changes.Sample Project
.hr_prod
database is not accessible.hr_prod
database, and click Request Querier role.
src/app/api/bytebase/webhook/route.ts
: handle the webhook from Bytebase.src/app/api/slack/interact/route.ts
: handle the interaction (Approve or Deny) from Slack to Bytebase.src/lib/slack.ts
: send the message to Slack via using the its web API.