Mergify Enterprise
ArchitectureRequirementsInstallationManual Installation (Legacy)Advanced FeaturesSlack Integration
For Mergify Enterprise ≥ 8.6.0
Mergify is now able to send notifications to your Slack workspace for any activity.
Create a Slack App
First, you need to create a Slack App. Go to https://api.slack.com/apps and click the “Create New App” button.
Once your App is created, you have to configure it so Mergify has the right permissions to connect to Slack.
In the “OAuth & Permissions” menu:
- Add a redirect URL:
https://mergify.mycompany.com/front/integrations/callback/slack
- Add the following scopes, so Mergify can send messages to your channels and keep channel's data up-to-date.
In the “Incoming Webhooks” menue:
- Activate Incoming Webhooks, so Mergify can send messages to your channels.
In the “Event Subscriptions” menu:
- Enable events, so Mergify can keep the channel names up-to-date.
- Set the “Request URL” to:
https://mergify.mycompany.com/slack-event
- Add a subscription to bot events:
channel_rename
Set Environment Variables
In your Mergify container, set the following environment variables:
MERGIFYENGINE_SLACK_CLIENT_ID
: the client ID of your Slack App, used to connect Mergify and Slack thanks to OAuth2.MERGIFYENGINE_SLACK_CLIENT_SECRET
: the client secret of your Slack App, used to connect Mergify and Slack thanks to OAuth2.MERGIFYENGINE_SLACK_SIGNING_SECRET
: the signing secret of your Slack App, used by Mergify to authenticate requests from Slack.
You can find those values in your Slack App, under the “Basic Information” menu.
Allow URLs
Once the Slack integration is set, Mergify will perform some calls to Slack APIs to send messages or keep Slack data up-to-date. Here are the URLs you’ll have to allow Mergify to call.
https://slack.com/oauth/v2/authorize
: called during the OAuth2 processhttps://slack.com/api/oauth.v2.access
: called during the OAuth2 processhttps://hooks.slack.com/*
: called to send notifications to Slackhttps://slack.com/api/conversations.info
: called to keep Slack channel data up-to-date in the Mergify database
Slack will also have to call URLs from your Mergify App.
https://mergify.mycompany.com/front/integrations/callback/slack
: called during the OAuth2 processhttps://mergify.mycompany.com/slack-event
: called whenever a channel is renamedhttps://mergify.mycompany.com/slack-interaction
: called whenever a user clicks on a button in a Slack notification from Mergify
Connect Mergify to Slack
Once your Slack App is ready, you just have to connect Mergify to your Slack workspace on the Mergify dashboard.
This integration can be configured to send notifications to multiple channels for a various kind of events.