Leif is a really stupid Go bot for Slack
In order for Leif to run you need to:
- Create a Slack bot user.
- Then generate an OAuth2 bot token from the apps page.
The actual token can then be found under the Your Apps page if you click on the name of your created bot and then go to theOAuth & Permissions
page and thenBot User OAuth Access Token
.
The token should start with xoxb-*.
Make sure you have the generated tokens from the requirements step and run:
docker run -e SLACK_TOKEN=<slack-token> antonjah/leif
Running with all functionality:
docker run -d --restart unless-stopped \
-e SLACK_TOKEN=<slack-token> \
-e GITLAB_TOKEN=<gitlab-token> \
-e GITLAB_BASE_URL=<gitlab-url> \
-e POSTMORD_TOKEN=<postmord-token> \
-e JIRA_URL=<jira-url> \
-e JIRA_USERNAME=<jira-username> \
-e JIRA_TOKEN=<jira-token> \
antonjah/leif
List of possible commands
Leif <question>?
Examples:
Leif what is the meaning of life?
Leif what is the weather like in Skellefteå?
Leif how high is the empire state building?
Leif what's the IMDB score for Band of Brothers?
Get the latest grand prix results
.f1
Lunch (matochmat)
Search for something you'd like to eat or get a specific menu for a restaurant
.lunch carbonara
.lunch pizzeria mama mia
Lunches (matochmat)
Get all lunch menus for today
.lunch
If you want to know if any restaurants are serving tacos today, there's a command for that!
.tacos
Insulting someone. What more do you need?
.insult @Simon
Given that the GITLAB_TOKEN
and GITLAB_BASE_URL
ENVs are set you can search GitLab for
commits, projects and merge requests
.gitlab JIRAISSUE1234
Given that the POSTMORD_TOKEN
ENV is set you can get the shipment status for your parcel
from PostNord
.postmord 1234567890
Leif will try to get information on how to use a specific command
.tldr docker-compose
.tldr grep
Flip a coin
.flip
Make Leif decide something for you
.decide do we really need these unit tests?
Get Leif logs. Supported levels are:
- Info
- Warning
- Error
- Fatal
- Trace
- Debug
- Panic
.log error
Get the COVID19 status for a country
.corona sweden
Get information about an issue on JIRA
.jira FOO-1234
Output help and known commands
.help