Integrations4 min read

Slack Integration

Connect MergeShield to Slack with one click. Get real-time notifications in a channel of your choice and use slash commands to check PR status, list high-risk PRs, view pending approvals, and more.

What the Slack Integration Does

The MergeShield Slack integration gives your team notifications and slash commands through a single connection. Once installed, MergeShield can:

  • Send notifications — Real-time alerts to a Slack channel when events occur (high-risk PRs, auto-merge decisions, approval requests, trust changes, and more)
  • Check PR status — See the risk score, analysis status, and approval state for any PR
  • List high-risk PRs — View all PRs that need attention across your repos
  • View pending approvals — See all PRs awaiting approval across your org
  • View auto-merged PRs — See recently auto-merged PRs
  • Get org summary — Quick overview of repos, open PRs, analyses, and avg risk score

The Slack integration is available on Pro and Enterprise plans.

Installing the Slack App

Connecting MergeShield to Slack takes about 30 seconds:

  1. 1Navigate to Dashboard → Settings → Integrations
  2. 2Find the Slack section
  3. 3Click Install Slack App — this redirects you to Slack's OAuth authorization page
  4. 4Select the Slack workspace you want to connect and click Allow
  5. 5Back in MergeShield, pick the notification channel where you want alerts to appear
  6. 6You're done — both notifications and slash commands are now active

Once installed, MergeShield stores an encrypted bot token and your Slack team ID. Notifications are sent to your chosen channel using the bot token (no webhook URL needed). You can change the notification channel or disconnect at any time from the Settings page.

Only organization owners and admins can install the Slack app.

Tip

The Slack app uses Bot Token OAuth with the commands, chat:write, and channels:read scopes. It does not access your message history. Notifications are delivered via chat.postMessage to the channel you select.

Available Slash Commands

After installation, use the /mergeshield slash command in any Slack channel:

/mergeshield status <repo> <PR#> — Check the status of a specific PR. Returns the risk score, analysis status, author, files changed, and more.

/mergeshield list [repo] — List recent high-risk PRs (score 50+) across all repositories, or filter by a specific repo name.

/mergeshield pending — List all PRs currently awaiting approval across your org. Shows risk scores and links to the dashboard to approve or reject.

/mergeshield merged — List recently auto-merged PRs with their risk scores.

/mergeshield summary — Get an org overview: active repos, open PRs, total analyses, pending approvals, and average risk score over the last 30 days.

/mergeshield approve <repo> <PR#> — Approve a pending PR directly from Slack _(coming soon)_.

/mergeshield help — Shows a summary of all available commands.

All responses are ephemeral (only visible to you) to avoid cluttering channels. For status, list, pending, merged, and summary, the bot sends a follow-up message with full details asynchronously.

Example Slack commands
/mergeshield status test-repo 42
/mergeshield list
/mergeshield pending
/mergeshield merged
/mergeshield summary
/mergeshield help

Notifications and Slash Commands

The Slack integration provides both notifications and slash commands through one connection:

Notifications — Automated messages sent to your chosen notification channel when governance events occur (high-risk PR detected, auto-merge blocked, approval needed, trust score changes). These are delivered via the bot token using chat.postMessage — no separate webhook URL is needed.

Slash commands — Interactive commands for checking status and taking actions directly from any Slack channel.

Notifications are great for passive monitoring ("alert the team when something happens"), while slash commands are great for active workflows ("let me check and act on something right now"). Both work through the same Slack app installation.

To configure which event types trigger Slack notifications, visit Settings → Notifications and toggle the events you want.