Slack app that provides preview of the pivotal tracker stories when story URLs are posted to the channels.
-
Automatically post preview of Pivotal Tracker stories mentioned in the message.
-
Expand story details with message only visible to single user.
-
Configurable number of stories in a single message to ask if preview is needed.
- Deploy this app using preferred way, you can refer to Deployment section. The port needs to be publically available.
- Go to Pivotal Tracker profile page. Generate API token, use it as a
PIVOTAL_TOKENenvironment variable value. - Go to My Apps slack page and create new app. Choose the name (e.g "Pivotal Tracker Slack Preview") and select desired workspace.
- On the Basic Information page, copy "Signing Secret" and use it as a
SLACK_SIGNING_SECRETenvironment variable value. - Go to OAuth & Permissions page. Copy "Bot User OAuth Access Token" and use it as a
SLACK_TOKENvalue. - Add the following OAuth scopes:
channels:historychannels:readchat:writegroups:historyim:history
- Go to the Event Subscriptions page. Subscribe to the following bot events:
message.channelsmessage.groupsmessage.im
- Enable events and configure Request URL in the form
http://<host>:<port>/events-endpoint. It is more secure to usehttps, but it will require some reverse proxy with certificate configured. - Go to Interactivity & Shortcuts page. Enable interactivity and add Request URL like
http://<host>:<port>/interactive-endpoint. - Add app to the channel. In Slack open:
- "Channel Details"
- "(...) More"
- "Add apps"
- Find an app in a list
Environment variables:
| Env | Description | Default |
|---|---|---|
SLACK_TOKEN |
Bot User OAuth Access Token | - |
SLACK_SIGNING_SECRET |
Slack Signing Secret | - |
PIVOTAL_TOKEN |
Pivotal Tracker API token | - |
PORT |
HTTP port to listen | 8080 |
STORIES_COUNT_TO_ASK |
Number of stories in a single message to start asking if needs to post preview | 2 |
Edit ./configs/.env.prod file to add all required configuration parameters.
Then run:
$ docker-compose -f ./deployment/docker-compose.yml --env-file ./configs/.env.prod up -dTo update:
$ docker-compose -f ./deployment/docker-compose.yml pull
$ docker-compose -f ./deployment/docker-compose.yml --env-file ./configs/.env.prod up --no-deps -d web
