How to Integrate Slack and GitHub for Automatic Repository Issue and Pull Request Notifications

Tadashi Shigeoka ·  Fri, February 25, 2022

By automatically sending GitHub notifications to Slack, development teams can quickly share the latest status. This setup guide explains how to automatically post information about GitHub repository issues, pull requests, and more to specific Slack channels.

Steps to Set Up GitHub -> Slack Notifications

1. Invite GitHub App to Slack Channel

To invite the GitHub app to a Slack channel, use the following command:

/invite @github

2. Sign In to GitHub Account

Next, sign in to GitHub within Slack. Use the following command to authenticate:

/github signin

3. Set Up GitHub Repository Notifications

To send GitHub repository notifications (issues, pull requests, etc.) to a specific Slack channel, use the following command:

/github subscribe owner/repo issues, pulls, releases, deployments, reviews, branches, comments:'channel', discussions

Replace the owner/repo part with the owner and repository name you want to integrate. For example, write it like codenote-net/sandbox. Also, the command options are my configuration example, so please modify them as needed.

4. Disable Slack Thread Posting

Configure notifications to be posted directly to the channel rather than as threads in Slack.

  1. Open the settings screen using the following command:
    /github settings
  2. To disable threading, disable the following item:
    • Disable threading for Pull Request and Issue notifications -> Disable

5. Display Repository Subscription List

To display a list of currently subscribed repositories and their notification settings, use the following command:

/github subscribe list features

6. Unsubscribe from Repository

If you want to unsubscribe from repository notifications, use the following command:

/github unsubscribe owner/repo

Other Features

The GitHub and Slack integration offers various other convenient features. For more details, see the official documentation below:

https://github.com/integrations/slack

That’s all from the Gemba.