Skip to main content

此版本的 GitHub Enterprise 已停止服务 2022-10-12. 即使针对重大安全问题,也不会发布补丁。 为了获得更好的性能、更高的安全性和新功能,请升级到最新版本的 GitHub Enterprise。 如需升级帮助,请联系 GitHub Enterprise 支持

Configuring notifications

Choose the type of activity on GitHub that you want to receive notifications for and how you want these updates delivered.

Notification delivery options

You can receive notifications for activity on your GitHub Enterprise Server instance in the following locations.

  • The notifications inbox in the your GitHub Enterprise Server instance web interface
  • The notifications inbox on GitHub Mobile, which syncs with the inbox on your GitHub Enterprise Server instance
  • An email client that uses a verified email address, which can also sync with the notifications inbox on your GitHub Enterprise Server instance and GitHub Mobile

要在 GitHub 和 GitHub Mobile 上使用通知收件箱,必须在通知设置中启用 Web 和移动通知。 For more information, see "Choosing your notification settings."

Tip: If you receive both web and email notifications, you can automatically sync the read or unread status of the notification so that web notifications are automatically marked as read once you've read the corresponding email notification. To enable this sync, your email client must be able to view images from the no-reply email address for your GitHub Enterprise Server instance, which your site administrator configures.

Benefits of the notifications inbox

The notifications inbox on your GitHub Enterprise Server instance and GitHub Mobile includes triaging options designed specifically for your GitHub notifications flow, including options to:

  • Triage multiple notifications at once.
  • Mark completed notifications as Done and remove them from your inbox. To view all of your notifications marked as Done, use the is:done query.
  • Save a notification to review later. Saved notifications are flagged in your inbox and kept indefinitely. To view all of your saved notifications, use the is:saved query.
  • Unsubscribe and remove a notification from your inbox.
  • Preview the issue, pull request, or team discussion where the notification originates on your GitHub Enterprise Server instance from within the notifications inbox.
  • See one of the latest reasons you're receiving a notification from your inbox with a reasons label.
  • Create custom filters to focus on different notifications when you want.
  • Group notifications in your inbox by repository or date to get a quick overview with less context switching

In addition, you can receive and triage notifications on your mobile device with GitHub Mobile. For more information, see "Managing your notification settings with GitHub Mobile" or "GitHub Mobile."

Benefits of using an email client for notifications

One benefit of using an email client is that all of your notifications can be kept indefinitely depending on your email client's storage capacity. Your inbox notifications are only kept for 5 months on GitHub unless you've marked them as Saved. Saved notifications are kept indefinitely. For more information about your inbox's retention policy, see "About notifications."

Sending notifications to your email client also allows you to customize your inbox according to your email client's settings, which can include custom or color-coded labels.

Email notifications also allow flexibility with the types of notifications you receive and allow you to choose different email addresses for updates. For example, you can send certain notifications for a repository to a verified personal email address. For more information, about your email customization options, see "Customizing your email notifications."

About participating and watching notifications

When you watch a repository, you're subscribing to updates for activity in that repository. Similarly, when you watch a specific team's discussions, you're subscribing to all conversation updates on that team's page. For more information, see "About team discussions."

To see repositories that you're watching, go to your watching page. For more information, see "Managing subscriptions and notifications on GitHub."

You can configure notifications for a repository on the repository page, or on your watching page.

About custom notifications

You can customize notifications for a repository. For example, you can choose to only be notified when updates to one or more types of events (issues, pull requests, releases, security alerts, or discussions) happen within a repository, or ignore all notifications for a repository. For more information, see "Configuring your watch settings for an individual repository" below.

Participating in conversations

Anytime you comment in a conversation or when someone @mentions your username, you are participating in a conversation. By default, you are automatically subscribed to a conversation when you participate in it. You can unsubscribe from a conversation you've participated in manually by clicking Unsubscribe on the issue or pull request or through the Unsubscribe option in the notifications inbox.

For conversations you're watching or participating in, you can choose whether you want to receive notifications by email or through the notifications inbox on your GitHub Enterprise Server instance and GitHub Mobile. For more information, see "Choosing your notification settings."

Screenshot of participating and watching notifications options

For example:

  • If you don't want notifications to be sent to your email, unselect email for participating and watching notifications.
  • If you want to receive notifications by email when you've participated in a conversation, then you can select email under "Participating".

If you do not enable watching or participating notifications for web and mobile, then your notifications inbox will not have any updates.

Customizing your email notifications

After enabling email notifications, your GitHub Enterprise Server instance will send notifications to you as multipart emails that contain both HTML and plain text copies of the content. Email notification content includes any Markdown, @mentions, emojis, hash-links, and more, that appear in the original content on your GitHub Enterprise Server instance. If you only want to see the text in the email, you can configure your email client to display the plain text copy only.

Note: You'll only receive email notifications if outbound email support is enabled on your GitHub Enterprise Server instance. For more information, contact your site administrator.

Tip: If you receive both web and email notifications, you can automatically sync the read or unread status of the notification so that web notifications are automatically marked as read once you've read the corresponding email notification. To enable this sync, your email client must be able to view images from the no-reply email address for your GitHub Enterprise Server instance, which your site administrator configures.

Choose a default email address where you want to send updates for conversations you're participating in or watching. You can also specify which activity on your GitHub Enterprise Server instance you want to receive updates for using your default email address. For example, choose whether you want updates to your default email from:

  • Comments on issues and pull requests.
  • Pull request reviews.
  • Pull request pushes.
  • Your own updates, such as when you open, comment on, or close an issue or pull request.

Depending on the organization that owns the repository, you can also send notifications to different email addresses. Your organization may require the email address to be verified for a specific domain. For more information, see "Choosing where your organization’s email notifications are sent."

You can also send notifications for a specific repository to an email address. For more information, see "About email notifications for pushes to your repository."

只有在通知设置中选择了接收电子邮件通知时,才会收到通知电子邮件。

Filtering email notifications

Each email notification that your GitHub Enterprise Server instance sends contains header information. The header information in every email is consistent, so you can use it in your email client to filter or forward all GitHub notifications, or certain types of GitHub notifications.

If you believe you're receiving notifications that don't belong to you, examine the X-GitHub-Recipient and X-GitHub-Recipient-Address headers. These headers show who the intended recipient is. Depending on your email setup, you may receive notifications intended for another user.

Email notifications from your GitHub Enterprise Server instance contain the following header information:

HeaderInformation
From addressThis address will always be 'the no-reply email address configured by your site administrator'.
To fieldThis field connects directly to the thread. If you reply to the email, you'll add a new comment to the conversation.
Cc addressGitHub Enterprise Server will Cc you if you're subscribed to a conversation. The second Cc email address matches the notification reason. The suffix for these notification reasons is 基于由站点管理员配置的� 需回复电子邮件地址. The possible notification reasons are:
  • assign: You were assigned to an issue or pull request.
  • author: You created an issue or pull request.
  • ci_activity: A GitHub Actions workflow run that you triggered was completed.
  • comment: You commented on an issue or pull request.
  • manual: There was an update to an issue or pull request you manually subscribed to.
  • mention: You were mentioned on an issue or pull request.
  • push: Someone committed to a pull request you're subscribed to.
  • review_requested: You or a team you're a member of was requested to review a pull request.
  • security_alert: GitHub detected a vulnerability in a repository you receive alerts for.
  • state_change: An issue or pull request you're subscribed to was either closed or opened.
  • subscribed: There was an update in a repository you're watching.
  • team_mention: A team you belong to was mentioned on an issue or pull request.
  • your_activity: You opened, commented on, or closed an issue or pull request.
mailing list fieldThis field identifies the name of the repository and its owner. The format of this address is always <repository name>.<repository owner>.[hostname].
X-GitHub-Severity field影响一个或多个存储库的 Dependabot alerts 的电子邮件通知包括 X-GitHub-Severity � �头字段。 可以使用 X-GitHub-Severity � �头字段的值来筛选 Dependabot alerts 的电子邮件通知。 The possible severity levels are:
  • low
  • moderate
  • high
  • critical
For more information, see "About Dependabot alerts."

Choosing your notification settings

  1. 在任何页面的右上角,单击 表示任何未读消息的通知
  2. 在左侧边� �中的存储库列表下,使用“管理通知”下拉按钮单击“通知设置”。 管理通知下拉菜单选项
  3. On the notifications settings page, choose how you receive notifications when:

Automatic watching

By default, anytime you gain access to a new repository, you will automatically begin watching that repository. Anytime you join a new team, you will automatically be subscribed to updates and receive notifications when that team is @mentioned. If you don't want to automatically be subscribed, you can unselect the automatic watching options in your notification settings.

Automatic watching options

If "Automatically watch repositories" is disabled, then you will not automatically watch your own repositories. You must navigate to your repository page and choose the watch option.

For more information, see "Choosing your notification settings."

Configuring your watch settings for an individual repository

You can choose whether to watch or unwatch an individual repository. You can also choose to only be notified of certain event types such as issues, pull requests, releases, security alerts, or discussions (if enabled for the repository) , or completely ignore an individual repository.

  1. On your GitHub Enterprise Server instance, navigate to the main page of the repository.

  2. In the upper-right corner, select the "Watch" drop-down menu to click a watch option. Watch options in a drop-down menu for a repository

    The Custom option allows you to further customize notifications so that you're only notified when specific events happen in the repository, in addition to participating and @mentions. Custom watch options in a drop-down menu for a repository If you select "Issues", you will be notified about, and subscribed to, updates on every issue (including those that existed prior to you selecting this option) in the repository. If you're @mentioned in a pull request in this repository, you'll receive notifications for that too, and you'll be subscribed to updates on that specific pull request, in addition to being notified about issues.

Choosing where your organization’s email notifications are sent

If you belong to an organization, you can choose the email account you want notifications for organization activity sent to. For example, if you belong to an organization for work, you may want your notifications sent to your work email address, rather than your personal address.

只有在通知设置中选择了接收电子邮件通知时,才会收到通知电子邮件。

  1. 在任何页面的右上角,单击 表示任何未读消息的通知

  2. 在左侧边� �中的存储库列表下,使用“管理通知”下拉按钮单击“通知设置”。 管理通知下拉菜单选项

  3. Under "Default notification email", select the email address you'd like notifications sent to.

    Screenshot of the default notification email address dropdown

  4. Click Save.

Customizing email routes per organization

If you are a member of more than one organization, you can configure each one to send notifications to any of the email addresses for your account.

  1. 在任何页面的右上角,单击 表示任何未读消息的通知

  2. 在左侧边� �中的存储库列表下,使用“管理通知”下拉按钮单击“通知设置”。 管理通知下拉菜单选项

  3. Under "Custom routing," find your organization's name in the list.

    List of organizations and email addresses

  4. Click Edit next to the email address you want to change.

    Editing an organization's email addresses

  5. Select one of your verified email addresses, then click Save.

    Switching your per-org email address

Dependabot alerts notification options

若要在存储库上接收有关 Dependabot alerts 的通知,需要监视这些存储库,并订阅以接收“所有活动”通知或配置自定义设置以包括“安全警报”。 有关详细信息,请参阅“为单个存储库配置监视设置”。

可以选择通知的� 递方法,以及通知发送给� 的频率。 By default, if your enterprise owner has configured email for notifications on your instance, you will receive Dependabot alerts:

  • by email, an email is sent when Dependabot is enabled for a repository, when a new manifest file is committed to the repository, and when a new vulnerability with a critical or high severity is found (Email each time a vulnerability is found option).
  • in the user interface, a warning is shown in your repository's file and code views if there are any insecure dependencies (UI alerts option).
  • on the command line, warnings are displayed as callbacks when you push to repositories with any insecure dependencies (Command Line option).
  • in your inbox, as web notifications. A web notification is sent when Dependabot is enabled for a repository, when a new manifest file is committed to the repository, and when a new vulnerability with a critical or high severity is found (Web option).
  • on GitHub Mobile, as web notifications. For more information, see "Enabling push notifications with GitHub Mobile."

Note: The email and web/GitHub Mobile notifications are:

  • per repository when Dependabot is enabled on the repository, or when a new manifest file is committed to the repository.

  • per organization when a new vulnerability is discovered.

You can customize the way you are notified about Dependabot alerts. For example, you can receive a weekly digest email summarizing alerts for up to 10 of your repositories using the Email a digest summary of vulnerabilities and Weekly security email digest options.

For more information about the notification delivery methods available to you, and advice on optimizing your notifications for Dependabot alerts, see "Configuring notifications for Dependabot alerts."

GitHub Actions notification options

Choose how you want to receive workflow run updates for repositories that you are watching that are set up with GitHub Actions. You can also choose to only receive notifications for failed workflow runs.

Screenshot of the notification options for GitHub Actions

Managing your notification settings with GitHub Mobile

When you install GitHub Mobile, you will automatically be opted into web notifications. Within the app, you can enable push notifications for the following events.

  • Direct mentions
  • Assignments to issues or pull requests
  • Requests to review a pull request
  • Requests to approve a deployment

You can also schedule when GitHub Mobile will send push notifications to your mobile device.

GitHub Enterprise Server 使用背景提取支持推送通知,而不将您的信息发送给第三方服务,� 此您可能会在接收推送通知时遇到延迟。

Managing your notification settings with GitHub for iOS

  1. In the bottom menu, tap Profile.
  2. To view your settings, tap .
  3. To update your notification settings, tap Notifications and then use the toggles to enable or disable your preferred types of push notifications.
  4. Optionally, to schedule when GitHub Mobile will send push notifications to your mobile device, tap Working Hours, use the Custom working hours toggle, and then choose when you would like to receive push notifications.

Managing your notification settings with GitHub for Android

  1. In the bottom menu, tap Profile.
  2. To view your settings, tap .
  3. To update your notification settings, tap Configure Notifications and then use the toggles to enable or disable your preferred types of push notifications.
  4. Optionally, to schedule when GitHub Mobile will send push notifications to your mobile device, tap Working Hours, use the Custom working hours toggle, and then choose when you would like to receive push notifications.

Configuring your watch settings for an individual repository with GitHub Mobile

You can choose whether to watch or unwatch an individual repository. You can also choose to only be notified of new releases, or completely ignore an individual repository.

  1. On GitHub Mobile, navigate to the main page of the repository.
  2. Tap Watch. The watch button on GitHub Mobile
  3. To choose what activities you receive notifications for, tap your preferred watch settings. Watch settings dropdown menu in GitHub Mobile