Skip to content
/ slack Public
forked from integrations/slack

Bring your code to the conversations you care about with the GitHub and Slack integration

License

Notifications You must be signed in to change notification settings

shiqi/slack

 
 

Repository files navigation

GitHub + Slack Integration

About

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.

Table of Contents


Installing the GitHub integration for Slack

Requirements

This app officially supports GitHub.com and Slack.com but the team plans to support GitHub Enterprise and Slack Enterprise Grid in the future.

Migrating from the legacy GitHub integration for Slack

When you install the new GitHub integration for Slack in your Slack workspace, you'll be prompted to reconfigure your old settings - so getting set up again is easy. Once you subscribe with the new app, the legacy app will be disabled but the legacy notification configurations will be migrated automatically.

migration

Installation

Install the GitHub integration for Slack. After you've signed in to your Slack workspace, you will be prompted to give the app access:

auth

After the app is installed, you will see public links to GitHub issues, pull requests, and code rendered as rich text via a Slack unfurl in your workspace.

unfurl_convo

Subscribing and Unsubscribing

At this point, your Slack and GitHub user accounts are not linked. To link the two accounts, authenticate to GitHub using a /github slash command, /github signin.

The /github slash command also accepts a subscribe argument that you can use to subscribe to an Organization or Repository's activity /github subscribe <organization>/<repository>.

unfurl_code

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 subscribe command 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.

The /github slash command also supports unsubscribe. To unsubscribe to notifications from a repository, use /github unsubscribe <organization>/<repository>

Authorization

By granting the app access, you are providing the following authorizations to your GitHub and Slack accounts:

Slack Permission Scopes

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 /github slash 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

GitHub Permission Scopes

Permission scope Why we need it
Read access to code To render code snippets in Slack
Read access to commit statuses, deployments, issues, metadata, pull requests, and repository projects To render previews of links shared in Slack

Repository Activity

Subscribe to an Organization or a Repository On repositories, the app notifies of open, close, and re-open events on pull requests and issues in repositories you've subscribed to. It also notifies of any push directly to the repository's default branch as well as comments on issues and pull requests.

Types of Public Link Unfurls

When a user posts a GitHub link in Slack for a public repository, the app is designed to unfurl issues and pull requests, directly linked comments, code blobs with line numbers, as well as organizations, repositories, and users.

Configuration

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 slash command:

/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
  • statuses - Statuses on pull requests
  • commits - New commits on the default branch (usually master)
  • deployments - Updated status on deployments
  • public - A repository switching from private to public

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

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

Questions? Need help?

Please fill out GitHub's Support form and your request will be routed to the right team at GitHub.

Contributing

Want to help improve the integration between GitHub and Slack? Check out the contributing docs to get involved.

License

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.

About

Bring your code to the conversations you care about with the GitHub and Slack integration

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 92.9%
  • HTML 5.2%
  • CSS 1.6%
  • Other 0.3%