Using Slack with Mergify
Learn how you can send Slack notifications for Merge Queue events, CI Insights, and pull request activities.
Mergify offers comprehensive Slack integration, allowing you to receive notifications about your development workflow directly in Slack. You can get updates about Merge Queue activities, CI job completions, and pull request events, keeping your team informed without leaving Slack.
Setting Up the Mergify Slack Integration
Section titled Setting Up the Mergify Slack IntegrationBefore configuring specific notifications, you need to connect your Slack workspace to Mergify:
- Go to your Mergify dashboard
- Navigate to Integrations → Slack
- Follow the prompts to connect your Slack workspace
- Authorize the Mergify app for your Slack workspace
Once connected, you can configure different types of notifications based on your team’s needs.
Merge Queue Notifications
Section titled Merge Queue NotificationsGet real-time updates about your Merge Queue activities directly in Slack channels.
Merge Queue notifications include:
- Pull requests entering the queue
- Pull requests being merged
- Queue failures and retries
- Pull requests being removed from the queue
To set up Merge Queue notifications:
- In your Mergify dashboard, go to Integrations → Slack
- Select the Slack channel where you want to receive Merge Queue notifications
- Choose the repositories you want to monitor
- Configure notification preferences (all events or specific events only)

Those notifications are useful for:
- Team Coordination: Keep the entire team informed about merge activities
- Release Management: Monitor critical merges during release periods
- Debugging: Quickly identify when and why queue operations fail
CI Insights Notifications
Section titled CI Insights NotificationsMergify’s CI Insights can send Slack notifications about CI job completions, allowing your team to stay informed about build statuses, test failures, and deployment activities.
CI Insights notifications include:
- Repository and Branch: Which repository and branch the job ran on
- Job Information: Job name, pipeline name, and duration
- Status: Success, failure, cancellation with appropriate emoji
- Commit Details: Commit SHA and message
- Links: Direct links to the job logs and commit in GitHub
- Flaky Detection: Indication if a job was flagged as flaky
To configure CI Insights Slack notifications:
- Enable CI Insights: Make sure you have CI Insights enabled for your repositories
- Configure Notifications: In your Mergify dashboard, navigate to Integrations → Slack
- Set Up Rules: Configure notification rules based on your criteria

Notification Criteria
Section titled Notification CriteriaYou can filter notifications based on:
- Repository: Specific repositories to monitor
- Job Name: Specific jobs within your CI pipeline
- Pipeline Name: Specific workflows or pipelines
- Branch Name: Target specific branches (main, release branches, etc.)
- Job Conclusion: Success, failure, cancelled, or any combination
Example Configurations
Section titled Example ConfigurationsCritical Failures Only
Section titled Critical Failures OnlyMonitor failures on main branch for production-related jobs:
- Repository:
your-org/your-repo
- Branch:
main
- Job Conclusion:
failure
- Job Name:
deploy
,security-scan
,integration-tests
Release Monitoring
Section titled Release MonitoringMonitor all activities on release branches:
- Repository:
your-org/your-repo
- Branch:
release/*
- Job Conclusion:
failure
,success
Test Failure Alerts
Section titled Test Failure AlertsAlert on any test failures across all branches:
- Repository:
your-org/your-repo
- Job Conclusion:
failure
- Job Name:
*test*
Best Practices
Section titled Best Practices-
Start Broad, Then Narrow: Begin with broader notifications and gradually add filters to reduce noise
-
Use Separate Channels: Consider different Slack channels for different types of notifications (e.g., #ci-failures, #deployments, #security-alerts)
-
Focus on Critical Paths: Prioritize notifications for jobs that affect production deployments or security
-
Monitor Flaky Tests: Set up specific notifications for flaky test detection to improve test reliability
-
Team-Specific Filters: Configure different notification rules for different teams based on their responsibilities
Pull Request Notifications via GitHub-Slack Integration
Section titled Pull Request Notifications via GitHub-Slack IntegrationIn addition to native Mergify notifications, you can also receive Slack notifications based on Mergify actions by leveraging the GitHub to Slack integration.
Setting Up GitHub-Slack Integration
Section titled Setting Up GitHub-Slack Integration-
Click on the
Add to Slack
button -
Invite the GitHub app to the channel you want. Refer to the documentation for more details
-
Make sure you subscribe to the repositories to receive the mentions as private message for the GitHub Slack app
Using Mergify’s Comment Action with Slack Notifications
Section titled Using Mergify’s Comment Action with Slack NotificationsYou can use Mergify’s comment action to mention users in PR comments, which will trigger Slack notifications if the user has GitHub integrated with Slack.
Here’s an example that notifies the PR author when CI fails on hotfix PRs:
pull_request_rules:
- name: Notify author on CI failure for hotfixes
conditions:
- "#check-failure > 0"
- "label = hotfix"
actions:
comment:
message: "@{{author}} :warning: The CI failed on this hotfix PR. Please review the issues and address them."
This rule:
- Checks for CI failures with
#check-failure > 0
- Ensures the PR has the
hotfix
label - Comments mentioning the PR author using
@{{author}}
- Triggers a Slack notification if the author has GitHub-Slack integration enabled
Use Cases
Section titled Use Cases-
Critical PR Alerts: Notify authors about urgent issues with hotfix or release PRs
-
Review Requests: Automatically mention reviewers when PRs are ready
-
Status Updates: Keep stakeholders informed about important PR milestones
Troubleshooting
Section titled TroubleshootingIf you’re not receiving expected notifications:
-
Check Integration Status: Verify that Slack integration is properly connected in your Mergify dashboard
-
Review Notification Settings: Ensure your notification rules are correctly configured
-
Verify Channel Permissions: Make sure the Mergify Slack app has permission to post in your target channels
-
Test with Broader Filters: Temporarily use broader criteria to confirm the integration is working
-
Check Repository Access: Ensure Mergify has access to the repositories you want to monitor