HotCodePush

Slack

Create a Slack incoming webhook and a HotCodePush webhook in Slack format, and every release, pause and rollback you subscribe to posts to the channel.

HotCodePush posts a message to a Slack channel for every event you subscribe to. A Slack incoming webhook gives you the URL, and a HotCodePush webhook in the slack format posts to it.

Prerequisites

  • You have an organization whose plan includes webhooks. Billing and MAU lists what each plan includes.
  • You hold the Admin or Owner role in that organization.
  • You have a Slack workspace where you can add an app. To post into a private channel, you have to be a member of it.

Create the incoming webhook in Slack

If you already have a Slack app with incoming webhooks switched on, skip to step 3.

  1. Open Your Apps on Slack's API site, create an app, enter a name such as HotCodePush, choose the workspace and click Create.
  2. In the app's settings, open Incoming Webhooks and switch Activate Incoming Webhooks on.
  3. Click Add New Webhook to Workspace, pick the channel the app posts to and click Authorize.
  4. Copy the URL listed under Webhook URLs for Your Workspace. It starts with https://hooks.slack.com/services/.

The URL is the secret

Anyone who holds the URL can post to the channel, and Slack revokes a URL it finds published. Paste it into HotCodePush and keep it out of code and chat.

Create the webhook in HotCodePush

  1. Open your organization in the console, then Settings › Webhooks, and choose Create webhook.
  2. Enter a name, choose the format Slack and paste the URL from Slack.
  3. Pick the events to deliver. Pick one app as the filter when the channel should follow one app only.
  4. Choose Create. The webhook is enabled at once.

The six release events above cover a release channel. Events and payload lists every type. Webhooks has the message format and the delivery log. Signature and retries covers the retries.

Send a test event

In the console, open the webhook and choose Test. From the CLI:

npx hotcodepush webhook test --webhook "Releases to Slack"

If Slack answers an error, create a new incoming webhook there and change the webhook's URL in HotCodePush. If nothing happens, see the delivery log on Webhooks.

Next steps

Last updated on

On this page