This may be useful if you:
- Use Trello
- Use Kanban WIP on your Trello board
- Use Slack
It watches your Trello board for lists that exceed their limits, and post to Slack when you need to swarm.
Prerequisites:
- Heroku Toolbelt
- Slack credentials:
- Slack team name. If you use slack at yourcompany.slack.com it would be "yourcompany".
- Slack channel, for example "#general"
- A Slack token. Get one by setting up an incoming Webhook
- Trello credentials:
- Trello public key from the developer key page
- Trello member OAuth token. Substitute your public key into this URL and use it to get a token: https://trello.com/1/authorize?key=YOUR-KEY-HERE&name=swarmbot&expiration=never&response_type=token
- Trello board ID. This is the full, 24-character ID, which you can get by opening the link at the bottom of the developer key page.
Launching an instance:
git clone [email protected]:CXInc/swarmbot.git
cd swarmbot
heroku apps:create my-swarmbot-app-name-here
heroku addons:add rediscloud
heroku config:set SLACK_TEAM=YOUR_SLACK_TEAM \
SLACK_TOKEN=YOUR_SLACK_TOKEN \
SLACK_CHANNEL=YOUR_SLACK_CHANNEL \
TRELLO_DEVELOPER_PUBLIC_KEY=YOUR_TRELLO_KEY \
TRELLO_MEMBER_TOKEN=YOUR_TRELLO_TOKEN \
TRELLO_BOARD_ID=YOUR_TRELLO_BOARD_OD \
ROOT_URL=http://my-swarmbot-app-name-here.herokuapp.com
Prerequisites:
- Deployment prerequisites listed above
- Redis
- Ruby 2+
- Foreman (
gem install foreman
) - (Optional) ngrok (
gem install ngrok
)
Get the code:
git clone [email protected]:CXInc/swarmbot.git
cd swarmbot
cp .env.example .env
Ngrok provides a convenient way to make your local development instance accessible by Trello webhooks. You can either use it or any other method of making your local instance reachable by Trello. For ngrok, run:
ngrok 5000
Add your credentials in .env, then run:
foreman run
If all is working, the app should boot up, and then show a HEAD request come in when Trello establishes a webhook.