Start the Backend
python3.9 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
- Open a terminal and run
bash ./scripts/slack-bot.sh
(prerequisite - docker and docker-compose is required to run postgres)
This Slack bot improves the workflow of development teams. Especially with focus on Jenkins and some other functionalities inluding add user, remove user, modify user, request for leaves, approval leaves etc.
- Create a Slack App
- Select "From an app manifest"
- Select your Workspace
- Paste this Yaml code:
_metadata:
major_version: 1
minor_version: 1
display_information:
name: edith
features:
app_home:
messages_tab_enabled: true
messages_tab_read_only_enabled: false
bot_user:
display_name: edith
always_online: true
oauth_config:
scopes:
bot:
- app_mentions:read
- channels:read
- chat:write
- im:history
- im:write
- mpim:history
- reactions:read
- reactions:write
- users:read
- files:write
- team:read
settings:
event_subscriptions:
bot_events:
- app_mention
- message.im
interactivity:
is_enabled: true
org_deploy_enabled: false
socket_mode_enabled: true
- Create the App!
- Go to "Basic Information"
- -> in "App-Level Tokens", "Generate a Token" with the scope "connections:write"
- You will see a App-Level Token (beginning with xapp-). Sse it in the config.yaml as slack.socket_token.
- Go to "OAuth & Permissions":
- -> "Install to Workspace"
- -> you should see a "Bot User OAuth Access Token" (beginning with "xoxb-"). Use it as slack.token in the config.yaml
- start the bot!
- install go
- create a config.yaml (at least a slack token is required) or take a look in config.sample.yaml
- go inside slack bot folder
cd slack-bot
- Edit slack token and slack auth token in config.yaml file
- Run the bot server by
bash ./scripts/slack-bot.sh
Note: You have to invite the bot into the channel to be able to handle commands.