Bluemix app that sends updates for a GitHub wiki to a Slack channel.
-
If you do not already have a Bluemix account, sign up here
-
Download and install the Cloud Foundry CLI tool
-
Clone the app to your local environment
-
cd
into this newly created directory -
Open the
manifest.yml
file and change thehost
value to something unique
The host you choose will determinate the subdomain of your application's URL: <host>.mybluemix.net
- Connect to Bluemix in the command line tool and follow the prompts to log in
$ cf api https://api.ng.bluemix.net
$ cf login
- Push the app to Bluemix, but don't start it just yet
$ cf push --no-start
- Create a random string to use as the webhook secret
$ ruby -rsecurerandom -e 'puts SecureRandom.hex(20)'
- Take the output of this command and go to
https://github.com/<your>/<repo>/settings/hooks/new
and create a new webhook
- Payload URL:
https://<host>.mybluemix.net/webhook
(note trailing/webhook
path) - Content type:
application/json
- Secret:
<webhook_secret>
(generated above) - Which events?
- "Let me select individual events"
- check only "Gollum"
- Active: Checked
- Tell the app about that secret by updating the respective value in
manifest.yml
and.env
-
Go to
https://<your-group>.slack.com/services
-
Select
Custom Integrations
, click onIncoming Webooks
, and selectAdd Configuration
-
Give your webhook a name and an associated image
-
Get the webhook URL and associate it with your app by updating the respective value in
manifest.yml
and.env
Redeploy the app with cf push
and voila! You will now be receiving GitHub wiki updates in your Slack channel.
Thanks to statico for the initial Heroku app which inspired this Bluemix version.