<p>ChatOps uses <a href="https://help.github.com/articles/about-required-status-checks/" rel="nofollow noreferrer">GitHub status checks</a>, so it's decidedly GitHub specific and won't work with another provider.</p>

<p>However, if you're just after notifications, what about Heroku's <a href="https://devcenter.heroku.com/articles/app-webhooks" rel="nofollow noreferrer">App webhooks</a>? They have an 'entity' for new app releases (<code>api:release</code>) which might partially help you... in that you can set up a notification for successful releases, at least.</p>

<p>Alternatively, you could listen to the <code>api:build</code> entity's <code>create</code> event to know when a build starts, and the <code>update</code> event to know when its status changes - which I haven't used but presume would include a field for whether it succeeded or failed.</p>

<p>To subscribe to a webhook, you use the Heroku CLI:</p>

<pre><code>heroku webhooks:add --include api:build --level sync --url https://example.com/hooks
</code></pre>

<p>This is outlined in more detail in the documentation <a href="https://devcenter.heroku.com/articles/app-webhooks#step-3-subscribe" rel="nofollow noreferrer">here</a>. The payload you receive will look like <a href="https://devcenter.heroku.com/articles/app-webhooks#receiving-webhooks" rel="nofollow noreferrer">this</a>.</p>

<p>This isn't going to get it straight into Slack for you though, so you'll need a piece of middleware to do that. Here's a <a href="https://github.com/tdmalone/docker-to-slack" rel="nofollow noreferrer">tiny Sinatra app</a> I forked from a fork. It converts Docker Hub notifications into the format Slack expects for an incoming webhook. It should be pretty easy to edit it to make it convert Heroku webhooks instead. Then, voila, the tiny app itself deploys on Heroku, and that's the URL you stick in the webhook subscription above.</p>

<p>This is probably a lot more steps than you wanted. Someone may have already done it somewhere... but I can say that at least doing it the above way will give you a lot more flexibility to create your own customised workflows where you need them!</p>

CC BY-SA 4.0
2018-06-17T00:10:05.970Z
2018-06-17T00:10:05.970Z
Tim Malone
<p>Heroku has this great Slack chatbot (<a href="https://devcenter.heroku.com/articles/chatops" rel="nofollow noreferrer">chatops</a>) that lets you send messages if a deployment pipeline succeeded or failed. Unfortunately, while setting it up and logging in to Heroku, it asks for your github account and will not let you chose a different DVCS provider.</p>

<p>Since I am using Bitbucket, this leaves me without a solution for pipeline notifications. Has anyone solved this in the past?</p>

<git><slack><authentication>
Heroku Slack integration without using Github
keyboardsamurai
# Heroku Slack integration without using Github

(Asked by: username_0 on 2018-06-16)

Heroku has this great Slack chatbot ([chatops](https://devcenter.heroku.com/articles/chatops)) that lets you send messages if a deployment pipeline succeeded or failed. Unfortunately, while setting it up and logging in to Heroku, it asks for your github account and will not let you chose a different DVCS provider.

Since I am using Bitbucket, this leaves me without a solution for pipeline notifications. Has anyone solved this in the past?

**Tags:** git, slack, authentication


---

## 1 answers

### Answer by username_1 on 2018-06-17. Score: 4

ChatOps uses GitHub status checks, so it's decidedly GitHub specific and won't work with another provider.
However, if you're just after notifications, what about Heroku's App webhooks? They have an 'entity' for new app releases (api:release) which might partially help you... in that you can set up a notification for successful releases, at least.
Alternatively, you could listen to the api:build entity's create event to know when a build starts, and the update event to know when its status changes - which I haven't used but presume would include a field for whether it succeeded or failed.
To subscribe to a webhook, you use the Heroku CLI:
heroku webhooks:add --include api:build --level sync --url https://example.com/hooks

This is outlined in more detail in the documentation here. The payload you receive will look like this.
This isn't going to get it straight into Slack for you though, so you'll need a piece of middleware to do that. Here's a tiny Sinatra app I forked from a fork. It converts Docker Hub notifications into the format Slack expects for an incoming webhook. It should be pretty easy to edit it to make it convert Heroku webhooks instead. Then, voila, the tiny app itself deploys on Heroku, and that's the URL you stick in the webhook subscription above.
This is probably a lot more steps than you wanted. Someone may have already done it somewhere... but I can say that at least doing it the above way will give you a lot more flexibility to create your own customised workflows where you need them!


---

