Skip to documentation
Browse documentation
How-to guideSlack integration

Route repository outcomes to the right channel

Install one Slack workspace for your Code Voucher organization, then choose a channel and notification policy independently for every connected repository.

How the scope works

Organization

Owns one encrypted Slack workspace installation.

Repository

Chooses whether to notify, which channel, and which outcomes qualify.

Run

Creates at most one idempotent Slack publication for its terminal outcome.

A company with ten connected repositories installs Slack once. Each repository can post to a different channel, share a channel with related projects, or keep Slack disabled. Changing one repository's policy does not alter the others.

Operator setup

The Code Voucher operator creates one Slack app and configures these server-side values. They never belong in repository CI variables.

Code Voucher environment
SLACK_CLIENT_ID=...
SLACK_CLIENT_SECRET=...
SLACK_OAUTH_REDIRECT_URI=https://code-voucher.example.com/api/integrations/slack/oauth/callback/
SLACK_API_BASE_URL=https://slack.com/api
SLACK_API_TIMEOUT_SECONDS=10
  • Add the exact HTTPS callback URL to the Slack app OAuth settings
  • Grant the bot chat:write scope
  • Keep the client secret only in Code Voucher's secret store
  • Run Celery publisher workers and Celery Beat for delivery recovery

Connect and configure repositories

  1. 1

    Connect Slack once

    As an organization owner or administrator, open any managed repository and select Connect Slack. Approve the Code Voucher app for the company workspace.
  2. 2

    Choose a channel for each repository

    Enter the Slack channel ID, not its display name. Invite the Code Voucher bot to private channels before testing delivery.
  3. 3

    Choose an event policy

    Notify on failed runs, runs with blocking findings, or every completed run. The policy is evaluated separately for each repository.
  4. 4

    Enable notifications

    Turn on sanitized Slack summaries and save repository policy. Repositories remain dashboard-only until enabled individually.

Example company layout

One workspace, several repositories
acme/web-app       -> #web-reviews       -> blocking findings
acme/api           -> #backend-alerts    -> failed runs
acme/mobile        -> #mobile-reviews     -> all completed runs
acme/internal-tool -> Slack disabled      -> dashboard only

Multiple repositories may intentionally target the same channel. Every message identifies its repository and links to the private Code Voucher run.

Privacy and delivery behavior

  • Messages use a fixed sanitized summary rendered by the trusted publisher
  • Raw findings, source snippets, logs, screenshots, prompts, and patch diffs stay private
  • Slack tokens are encrypted and unavailable to review, patch, QA, and repository runners
  • Every run notification identifies the repository and links its merge or pull request when available
  • Stale runs and policy-ineligible outcomes are not posted
  • Unknown delivery outcomes are marked for manual reconciliation rather than blindly resent

Interactive Slack buttons and commands are not supported yet. Configure policies and inspect private evidence in the Code Voucher dashboard.