janky-slack-custom
Slack chat service adapter for Janky.
Adds custom slack message with user who ask for the build
Installation
- Add
gem "janky-slack-custom", "~>0.1"
to yourGemfile
- Run
bundle
to update theGemfile.lock
- Add
require "janky/chat_service/slack"
beforeJanky.setup(ENV)
inconfig/environment.rb
- Commit the changes and deploy to Heroku
- Run
heroku run rake db:migrate
to migrate the database
Configuration
You will need to setup an incoming webhook integration for your Slack team. You
can set this up at https://slack.com/services/new/incoming-webhook. When you
have created the incoming webhook take note of the token
value in the URL for
the webhook.
JANKY_CHAT
set toslackcustom
JANKY_CHAT_DEFAULT_ROOM
set to the default Slack channel (includes the #)JANKY_CHAT_SLACKCUSTOM_ACCOUNT
set to your Slack team nameJANKY_CHAT_SLACKCUSTOM_TOKEN
set to your authentication token found at https://api.slack.comJANKY_CHAT_SLACKCUSTOM_HOOK_TOKEN
set to your incoming webhook token from earlier Once these are all configured you're ready to have your build notifications come into your Slack channels. If you want to customise the username and icon that the Slack reports display, you can set the following environment variables:JANKY_CHAT_SLACKCUSTOM_USERNAME
is the username to report as (default:hubot
)JANKY_CHAT_SLACKCUSTOM_ICON_URL
is the icon to display (default: [labtocat][]) [labtocat]: https://octodex.github.com/images/labtocat.png