Use GitHub with Slack
GitHub is an online Git repository service (a system that allows multiple people to work on the same code at once). GitHub makes it easy to store your Git projects, work with teammates, track issues, and keep things organized.
With the GitHub app for Slack, you can get Slack notifications for the following types of events:
- Commit events
- Pull requests
- Issue events
- Deployment statuses
Connect GitHub to Slack
Tip: Before getting started, make sure you’ve already created your GitHub account. You can visit github.com to do so.
When you’re ready to connect GitHub to Slack, use the steps below:
- Visit GitHub in Slack’s App Directory.
- Click Install.
- Select a channel where GitHub events will be posted, or click create a new channel to make a brand new one.
- Click Add GitHub Integration.
- Click Authenticate your GitHub account.
- Choose the repositories you’d like Slack notifications for.
- Choose the GitHub events you’d like to post to Slack.
- If you’d like, you can customize the way Github posts appear in Slack by choosing a custom display name and icon.
- When you’re done, click Save Integration.
A note about permissions
Slack will ask your permission to access some GitHub repositories the first time you connect the app. We’ll need read and write access to all public and private repo data: code, issues, pull requests, wikis, settings, deploy keys, plus webhooks and services.
We understand this is a lot to ask! The only way Slack can access the full list of your public and private repos is with GitHub’s “repo” scope, which also provides all of the permissions listed above.
The only permissions Slack will use are the ones needed to read repo data (to get a list of your public and private repositories) and the write permission to configure your webhooks on GitHub.
Switch to unauthed mode
You can also set up the GitHub app in unauthed mode. This is helpful for two reasons: your team uses GitHub Enterprise or you don't want to grant Slack full read and write access.
To set up the GitHub app in unauthed mode, use steps 1-4 from the section above, then do the following:
- From the Slack setup page, click switch to unauthed mode.
- In your GitHub account, go to the repository that you'd like to monitor. Click Settings in the right navigation.
- Click Webhooks & Services in the left navigation, then press Add webhook.
- From the Slack App Directory window, click copy URL.
- Returning to your GitHub account, paste the URL under Payload URL.
- For the Content type, make sure application/json is selected.
- Confirm SSL verification is turned on.
- Click Add webhook.
- Return to your Slack setup page and click Save Integration.
Add a new GitHub organization to Slack
When you join a new GitHub organization, you’ll need to allow Slack to access it. Once you do so, the new organization will display in your existing app.
Grant access to a new organization
- Visit your GitHub Settings: github.com/settings.
- Under Authorized OAuth Apps, click Slack.
- Under Organization access, click Grant Access next to your new organization.
The new organization and its repositories will appear in your GitHub app page on Slack: my.slack.com/apps/manage.