Skip to main content

Customizing notifications for GitHub in Slack

Learn how to customize notifications for GitHub in Slack.

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.

Notifications enabled by default

The following notifications are enabled by default, but you can disable any of them using the /github unsubscribe OWNER/REPO [EVENT] command.

EventDescription
issuesOpened, closed, or reopened issues.
pullsNew or merged pull requests, and draft pull requests being marked as ready for review.
commitsNew commits on the default branch.
releasesPublished releases.
deploymentsDeployment status updates.

Notifications disabled by default

The following notifications are disabled by default, but you can enable any of them using the /github subscribe OWNER/REPO [EVENT] command.

EventDescription
reviewsPull request reviews.
workflowsActions workflow runs.
branchesCreated or deleted branches.
commentsNew comments on issues and pull requests.
commitsAll commits to any branch.
discussionsDiscussions created or answered.
+label:"YOUR-LABEL"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, use /github subscribe OWNER/REPO reviews comments.
  • To turn off activity for issues and pull requests, use /github unsubscribe OWNER/REPO issues pulls.

Filtering notifications

You can further customize your notifications with branch and label filters. Branch filters allow you to filter commit notifications based on branch names, while label filters allow you to filter issue and pull request notifications based on labels applied to them.

Branch filters for commit notifications

Branch filters allow you to filter commit notifications based on branch names. By default when you subscribe to the commits event, you will get notifications for your default branch. However, you can choose to filter on a specific branch, or a pattern of branches or all branches.

Example configurationDescription
/github subscribe OWNER/REPO commitsReceive commit notifications for the default branch.
/github subscribe OWNER/REPO commits:mainOnly receive commit notifications for the main branch.
/github subscribe OWNER/REPO commits:feature/*Receive commit notifications for all branches that start with feature/.
/github subscribe OWNER/REPO commits:*Receive commit notifications for all branches.

Note

You may have previously used the commits:all filter to receive commit notifications for all branches. This filter is closing down. To receive commit notifications for all branches, use the commits:* filter instead. If you have previously set up the commits:all filter, it will continue to work until you update your configuration to use the commits:* filter.

Label filters for issue and pull request notifications

Label filters allow you to filter notifications based on labels applied to issues and pull requests. When a label filter is set, only notifications for events including the specified label will be sent. For more information about labels, see Managing labels and Filtering and searching issues and pull requests.

Currently, it is only possible to have one required label filter per repository. The table below shows which event types are affected by label filters.

Event typeIs filtered by label
Pull requests
Issues
Comments
Reviews
Commits/Pushes
Branches

Creating label filters

To create a label filter, use the following command format:

Text
/github subscribe [OWNER/REPO] +label:"YOUR-LABEL"

This creates a required-label filter with the value YOUR-LABEL. Incoming events that support filters are discarded unless they have that label.

Updating label filters

You can update an existing label filter by specifying a new label value:

Text