Bring your code to the conversations you care about with the GitHub and Slack integration
Heads Up! The GitHub and Slack app has a few new features to help you turn conversations into next steps. Take action on pull requests, issues, and more right from your Slack channels to start moving work forward, faster. Read more about it on the GitHub blog.
The GitHub integration for Slack gives you and your teams full visibility into your GitHub projects right in Slack channels, where you can generate ideas, triage issues and collaborate with other teams to move projects forward. This integration is an open source project, built and maintained by GitHub.
This app officially supports GitHub.com (which includes our GitHub Enterprise cloud-hosted offering) and Slack.com, but the team plans to support GitHub Enterprise Server (our self-hosted product) and Slack Enterprise Grid in the future.
Install the GitHub integration for Slack. After you've signed in to your Slack workspace, you will be prompted to give the app access:
After the app is installed, and once you've added the GitHub integration to the relevant channels using
/invite @github, you will see previews of links to GitHub issues, pull-requests, and code rendered as rich text in your workspace.
At this point, your Slack and GitHub user accounts are not linked. To link the two accounts, authenticate to GitHub using a
/githubslash command also accepts a
subscribeargument that you can use to subscribe to an Organization or Repository's activity
/github subscribe /.
If you originally gave the app access to "All repositories" and you've created a new private repository on GitHub after installing the GitHub integration for Slack, the
/github subscribecommand will work automatically on your new repository. If you installed the app on a subset of repositories, the app will prompt you to install it on the new repository.
/githubslash command also supports
unsubscribe. To unsubscribe to notifications from a repository, use
/github unsubscribe /
By granting the app access, you are providing the following authorizations to your GitHub and Slack accounts:
|Permission scope|Why we need it| |---|---| |Access private conversations between you and the App | To message you with instructions. | |View links to GitHub.com in messages| To render rich links from
github.com| |Add link previews to GitHub.com to messages| To render rich links to
github.com| |Add slash commands| To add the
/githubslash command to your Slack workspace | |View the workspace or organization's name, email domain, and icon| To store subscriptions you set up| |Post messages as the app| To notify you of activity that happens on GitHub, in Slack|
|Permission scope|Why we need it| |---|---| |Read access to code| To render code snippets in Slack| |Read access to commit statuses, checks, issues, metadata, pull requests, and repository projects | To render previews of links shared in Slack| |Write access to issues, deployments, and pull requests | To take action from Slack with the
/githubcommand and directly from messages|
Subscribe to an Organization or a Repository On repositories, the app notifies of
re-openevents on pull requests and issues in repositories you've subscribed to. It also notifies of any
pushdirectly to the repository's default branch as well as
commentson issues and pull requests.
When a user posts a GitHub link to issues and pull requests, directly linked comments, code blobs with line numbers, as well as organizations, repositories, and users in Slack, a preview of the link will be shown.
Previews of links will not be shown if:
github.comhave been disabled for your workspace
Slack conversations often lead to decisions and actionable takeaways. Now it’s easier to start on next steps from Slack with slash commands for common GitHub actions, using
/github [action] [resource]. These commands let you:
/github close [issue link]
/github open [pull request link]
/github open [owner/repo]
You can also take action on GitHub directly from a Slack message by clicking on the '
...More Actions' menu available on every Slack message. From there you can:
You can customize your notifications by subscribing to activity that is relevant to your Slack channel, and unsubscribing from activity that is less helpful to your project.
Settings are configured with the
/github subscribe owner/repo [feature] /github unsubscribe owner/repo [feature]
These are enabled by default, and can be disabled with the
/github unsubscribe owner/repo [feature]command:
issues- Opened or closed issues
pulls- New or merged pull requests, as well as draft pull requests marked "Ready for Review"
statuses- Statuses on pull requests
commits- New commits on the default branch (usually
deployments- Updated status on deployments
public- A repository switching from private to public
releases- Published releases
These are disabled by default, and can be enabled with the
/github subscribe owner/repo [feature]command:
reviews- Pull request reviews
comments- New comments on issues and pull requests
branches- Created or deleted branches
commits:all- All commits pushed to any branch
+label:"your label"- Filter issues, pull-requests and comments based on their labels.
You can subscribe or unsubscribe from multiple settings at once. For example, to turn on activity for pull request reviews and comments:
/github subscribe owner/repo reviews comments
And to turn it back off:
/github unsubscribe owner/repo reviews comments
Label filters allow filtering incoming events based on a whitelist of required labels.
This is an overview of the event types that are affected by the required-label filter.
| Event | Is filtered | | ---------------------- | ----------------- | | Pull | ✅ Yes | | Comment (PR and Issue) | ✅ Yes | | Issue | ✅ Yes | | Review | ✅ Yes | | Status/Checks | ✅ (Depends on PR) | | Deployment | ❌ No | | Commit/Push | ❌ No | | Public | ❌ No | | Branch | ❌ No |
Create a filter with:
/github subscribe owner/repo +label:priority:HIGH
This creates a required-label filter with the value
priority:HIGH. Incoming events that support filters discarded unless they have that label.
To update the exiting filter just enter a new one, the old one will be updated. Currently, we only support having one filter. Multiple filters might be supported in the future.
/github subscribe owner/repo +label:"teams/designers"
Now the exiting filter
priority:HIGHhas been replaced by
Removing a filter is available via
/github unsubscribe owner/repo +label:teams/designers
This removes the
To see the currently active filters use
/github subscribe list features
It is common to have certain special characters in labels. Therefore we added support for the most common special characters for label filters. Here a few examples:
label:"DO NOT MERGE"
Most labels will work seamlessly, this includes all emojis that slack and github provide out of the box. However in the following rare circumstances you might run into difficulties:
When you install the new GitHub integration for Slack in your Slack workspace, you'll be prompted to move over all of your existing subscriptions - so getting set up again is easy. As you enable individual subscriptions in the new app, your settings will be automatically migrated and subscriptions in the legacy app will be disabled.
Please fill out GitHub's Support form and your request will be routed to the right team at GitHub.
Want to help improve the integration between GitHub and Slack? Check out the contributing docs to get involved.
The project is available as open source under the terms of the MIT License.
When using the GitHub logos, be sure to follow the GitHub logo guidelines.