Slack Integration
OpenCodeHub’s Slack integration sends real-time notifications for repository events and allows quick actions directly from Slack channels.
Supported Events
Section titled “Supported Events”| Event | Notification | Actions |
|---|---|---|
| Pull Request opened | Title, author, branch | Review, Approve |
| PR approved / changes requested | Reviewer, status | View diff |
| PR merged | Merger, commit count | View commit |
| CI failed | Job name, failure step | View logs, Retry |
| Issue created / assigned | Title, assignee | View, Comment |
| Release published | Version, changelog | View release |
1. Create a Slack App
Section titled “1. Create a Slack App”- Go to api.slack.com/apps
- Click Create New App → From scratch
- Name it “OpenCodeHub” and select your workspace
2. Configure Permissions
Section titled “2. Configure Permissions”Add the following Bot Token Scopes:
chat:writechat:write.publicim:writeusers:readfiles:write3. Install App to Workspace
Section titled “3. Install App to Workspace”- Click Install to Workspace
- Copy the Bot User OAuth Token (starts with
xoxb-)
4. Configure OpenCodeHub
Section titled “4. Configure OpenCodeHub”Add to your .env:
SLACK_ENABLED=trueSLACK_BOT_TOKEN=xoxb-your-token-hereSLACK_SIGNING_SECRET=your-signing-secretOr configure via the web UI:
- Go to Organization Settings → Integrations → Slack
- Paste the bot token and signing secret
- Click Test Connection
5. Subscribe Repositories
Section titled “5. Subscribe Repositories”Per-repository settings:
- Go to Repository → Settings → Integrations
- Enable Slack notifications
- Choose channel and events
Slash Commands
Section titled “Slash Commands”/och prs [repo] List open PRs/och review <pr-number> Quick review a PR/och queue [repo] Show merge queue status/och issues [repo] List open issuesTroubleshooting
Section titled “Troubleshooting””Notifications not appearing”
Section titled “”Notifications not appearing””- Verify the bot is invited to the channel (
/invite @OpenCodeHub) - Check repository subscription settings
- Verify
SLACK_BOT_TOKENis correct
”Too many notifications”
Section titled “”Too many notifications””- Enable notification batching
- Filter by event type in repository settings
- Use
@mentionsonly mode for noisy repos