A Slack integration for logging decisions in Git.
-
1️⃣ Log a decision in Slack with
/decision
-
2️⃣ Fill out the dialog
-
3️⃣ Log the decision
Depending on your configuration, this will either:
Commit the decision direct to your decisions repo Create a PR for review -
4️⃣ See you decision in Git
After committing directly, or merging the PR, your decision is logged in the correct category folder in your repo.
The latest build of decision is available at evns/decision on Docker Hub.
If you want to build it, the easiest way is via docker. From the root directory run:
docker build -t decision .
Settings are supplied via the following command line arguments:
Usage of ./decision:
-branch string
The branch where decisions will be committed (default "master")
-commit-as-prs
Commit decisions as Pull Requests (default false)
-commit-author string
The author name to use for commits (required)
-commit-email string
The author email to use for commits (required)
-github-token string
Your GitHub access token (required)
-slack-token string
Your Slack API token starting xoxb-... (required)
-source-owner string
The owner / organisation of the repo where decisions will be committed (required)
-source-repo string
The repo where decisions will be committed (required)
For example, to run locally:
docker run -p 8000:8000 evns/decision
-slack-token=xoxb-123456789101-1234567891011-abcdefghijklmnopqrstuvwx
-slack-signing-secret=abc123def456ghi789jkl101112mno13
-github-token=abc123def456ghi789jkl101112mno131415pqr1
-source-owner=evnsio
-source-repo=decisions
-commit-author=Chris Evans
[email protected]
-commit-as-prs=true
-
Navigate to https://api.slack.com/apps and select 'Create New App'. You can call your app whatever you like, for example 'Decision'.
-
On the
Basic Information
screen copy theSigning Secret
- you'll need this to run the app. -
Click
Slash Commands
>Create New Command
and enter the following:- Command:
/decision
- Request URL:
https://<your-domain>/slash
- Short description:
Log a decision!
- Command:
-
Click
OAuth & Permissions
and navigte toBot Token Scopes
. Add the following:chat:write
chat:write.public
-
Still in
OAuth & Permissions
clickInstall App to Workspace
. You'll be taken through the OAuth flow, and then return to the main screen where your bot token can be found. It's the one that starts withxoxb-...
. -
Click
Interactivity & Shortcuts
, toggle on Interactivity, and add the following:- Request URL:
https://<your-domain>/action
- Options URL:
https://<your-domain>/options
- Request URL:
Once this is complete and decision
is running you should be able to log decisions though the /decision
command in Slack.