- Go to https://api.slack.com/apps
- Click Create New App → From an app manifest
- Select your workspace
- Paste the contents of
slack-app-manifest.jsonfrom this repo - Click Create
- In the app settings sidebar, click Install App
- Click Install to Workspace and authorize
- Copy the Bot User OAuth Token (
xoxb-...)
- In Slack, right-click the channel you want notifications in (e.g.
#pr-reviews) - Click View channel details
- At the bottom of the popup, copy the Channel ID (e.g.
C0123456789)
- Go to your GitHub repository → Settings → Secrets and variables → Actions
- Add two repository secrets:
SLACK_BOT_TOKEN— thexoxb-...token from step 2SLACK_CHANNEL_ID— the channel ID from step 3
Copy the .github/workflows/pr-comment-slack-notify.yml file into your repository.
Push to your default branch and you're done! Any new comment on a PR will trigger a Slack notification with the commenter's GitHub avatar and username.
- General PR comments (the main conversation tab)
- Review comments (inline code comments during a review)
Only new comments trigger notifications (not edits or deletions).
- Notifications not appearing? Check that the
SLACK_BOT_TOKENandSLACK_CHANNEL_IDsecrets are set correctly. - Avatar not showing? The
chat:write.customizescope is required. Reinstall the app if you added it after the initial install. - "not_in_channel" error? The bot auto-joins public channels. For private channels, you need to manually invite it with
/invite @GitHub Comments.