GitHub for Slack
GitHub brings teams of software developers together to write code and manage projects. When you connect GitHub to Slack, you can be notified of all sorts of events in the Slack channel(s) of your choosing. Connect two of your most important tools and stay on top of your work, all from within Slack. 🛠
Decide which app to use
- GitHub for Slack: Are you on the GitHub Developer, Team or Business subscription? Then this app is for you!
- Github Notifications (Legacy): This app is compatible with GitHub Enterprise.
Install the app
GitHub for Slack
GitHub Notifications (Legacy)
With the GitHub app, you can get link previews in Slack for public repositories, set up notifications with slash commands and easily keep yourself up to speed with project activity.
Install the app
- Visit slack.github.com and click Add to Slack.
- Review the permissions the app needs to access and then click Continue to allow.
- Select the channels the app can access: all public channels, specific ones or none.
Once you’ve installed the app, the GitHub app will send you a direct message to help you complete setup and teach you about the /github slash command.
Tip: Use the slash command /github subscribe owner/repo to subscribe to your previous configurations.
Customise your notifications
The GitHub app makes it easy to customise what gets posted in Slack. You can subscribe to activity that’s relevant for the whole channel to see and unsubscribe from other types that are less helpful. Certain activities will notify you in Slack by default, while some others won’t:
Features enabled by default
Features not enabled by default
You can use these slash commands to customise your notifications:
- /github subscribe owner/repo [feature]
- /github unsubscribe owner/repo [feature]
A note about the GitHub app
If you use other Slack apps, you might notice some changes in the way GitHub is installed. This particular app functions at your workspace level, rather than at member level. That’s a good thing! Here’s why:
- The app will never disconnect if the original installer ever leaves your workspace.
- You can add the GitHub app to specific channels. Take your pick during installation or use /invite @github to add the app to any channel later on.
💡 Read more about the future of Slack apps on the Slack Platform Blog.
If you use GitHub’s on-premise option, GitHub Enterprise, you’ll need to install the GitHub Notifications (Legacy) app.
Install the app
- Go to GitHub in the Slack 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 want to receive Slack notifications for.
- Choose the GitHub events you want to post to Slack.
- You can customise the way GitHub posts appear in Slack by choosing a custom display name and icon if you like.
- Once you’ve finished, click Save integration.
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 repository data: code, issues, pull requests, wikis, settings and 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.
Note: Slack will only use these permissions to read repo data (to get a list of your public and private repositories) and to configure your webhooks on GitHub.
Switch to unauthed mode
You can choose to set up the app in unauthed mode. To do this, follow steps 1 to 4 from the section above, then do as follows:
- From the Slack setup page, click Switch to unauthed mode.
- In your GitHub account, go to the repository that you want 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 organisation
When you join a new GitHub organisation, you’ll need to allow Slack to access it. Once you do so, the new organisation will display in your existing app. Here’s how to get set up:
- Visit your GitHub settings: github.com/settings.
- Under Authorised OAuth apps, click Slack.
- Under Organisation access, click Grant access next to your new organisation.
The new organisation and its repositories will appear in your GitHub app page on Slack: my.slack.com/apps/manage.
Questions? Get in touch whenever you like – we’re here for you!