Notification delivery options
You can receive notifications for activity on GitHub in the following locations.
- The notifications inbox in the GitHub web interface
- The notifications inbox on GitHub Mobile, which syncs with the inbox in the web interface
- An email client that uses a verified email address, which can also sync with the notifications inbox in the web interface and GitHub Mobile
若要在 GitHub 和 GitHub Mobile 上使用通知收件箱,需要同时在通知设置中为 Email 和在 GitHub 上启用通知。 For more information, see Choosing your notification settings.
提示
如果同时通过电子邮件和在 GitHub 上接收通知,可以自动同步通知的已读或未读状态,以便在阅读相应的电子邮件通知后自动将 GitHub 上的通知标记为已读。 要启用此同步,电子邮件客户端必须能够查看来自 由你的站点管理员配置的 你的 GitHub Enterprise Server 实例 的 no-reply
电子邮件地址 的映像。
Benefits of the notifications inbox
The notifications inbox 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 or pull request where the notification originates on GitHub 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.
To see repositories that you're watching, go to your watching page. For more information, see Managing subscriptions for activity 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 (问题、拉取请求、发布、安全警报或讨论。) 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. For more information, see Choosing your notification settings.
For example, on your "Notification settings" page:
- If you don't want notifications to be sent to your email, deselect email for participating and watching notifications.
- If you want to receive notifications by email when you've participated in a conversation, then 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, GitHub 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 GitHub. If you only want to see the text in the email, you can configure your email client to display the plain text copy only.
注意
只有在 你的 GitHub Enterprise Server 实例 上启用出站电子邮件支持时,才会收到电子邮件通知。 更多信息请联系站点管理员。
提示
如果同时通过电子邮件和在 GitHub 上接收通知,可以自动同步通知的已读或未读状态,以便在阅读相应的电子邮件通知后自动将 GitHub 上的通知标记为已读。 要启用此同步,电子邮件客户端必须能够查看来自 由你的站点管理员配置的 你的 GitHub Enterprise Server 实例 的 no-reply
电子邮件地址 的映像。
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 GitHub you want to receive updates for using your default email address. For example, choose whether you want updates sent 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 Configuring notifications.
You can also send notifications for a specific repository to an email address. For more information, see 关于推送到仓库的电子邮件通知.
只有在通知设置中选择了接收电子邮件通知时,才会收到通知电子邮件。
Filtering email notifications
Each email notification that GitHub 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 GitHub contain header information.
Header | Information |
---|---|
From address | This address will always be the no-reply email address configured by your site administrator. |
To field | This field connects directly to the thread. If you reply to the email, you'll add a new comment to the conversation. |
Cc address | GitHub 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 based on the no-reply email address configured by your site administrator. The possible notification reasons are:
|
List-Id field | This field identifies the name of the repository and its owner. The format of this address is always OWNER/REPOSITORY <REPOSITORY.OWNER> , e.g. List-Id: grain-lang/grain <grain.grain-lang.HOSTNAME> . |
X-GitHub-Severity field | 影响一个或多个存储库的 Dependabot alerts 的电子邮件通知包括 X-GitHub-Severity 标头字段。 可以使用 X-GitHub-Severity 标头字段的值来筛选 Dependabot alerts 的电子邮件通知。 The possible severity levels are:
|
Replying to email notifications
You can reply to email notifications from GitHub and your reply will be posted to the issue, pull request, or discussion.
The reply-to
address on each email notification identifies the thread and the account that the comment will be posted from. This email address remains valid until you reset your password.
GitHub will not always include the full email contents and will attempt to strip some personally identifiable information from comments created via an email reply:
- Email addresses in a standard format, such as
octocat@github.com
, are transformed to***@***.***
. - Signatures and quoted reply chains, when the email client has used a
>
to mark those sections, are stripped. - While the unsubscribe link from your email notification is sometimes quoted, the link will only work when signed in to your account.
- Email attachments are not included in the resulting comment.
- The maximum length of a comment created via an email reply is 65530 characters.
Choosing your notification settings
-
在任意页面的右上角,单击 。
-
在左侧边栏中的存储库列表下,使用“管理通知”下拉按钮单击“通知设置”。
-
On the notifications settings page, choose how you receive notifications when:
- There are updates in repositories you're watching or in a conversation you're participating in. For more information, see About participating and watching notifications.
- You gain access to a new repository or you've joined a new team. For more information, see Automatic watching.
- There are new Dependabot alerts in your repository. For more information, see Dependabot alerts notification options.
- There are new deploy keys added to repositories that belong to organizations that you're an owner of. For more information, see Organization alerts notification options.
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.
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 Configuring notifications.
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 问题、拉取请求、发布、安全警报或讨论。 (if enabled for the repository), or completely ignore an individual repository.
-
在 GitHub 上,导航到存储库的主页面。
-
In the upper-right corner, select the "Watch" drop-down menu, then click a watch option.
If you want to further customize notifications, click Custom, then select specific events that you want to be notified of, such as Issues or Pull Requests, in addition to participating and @mentions.
For example, 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.
只有在通知设置中选择了接收电子邮件通知时,才会收到通知电子邮件。
-
在任意页面的右上角,单击 。
-
在左侧边栏中的存储库列表下,使用“管理通知”下拉按钮单击“通知设置”。
-
Under "Default notifications email", select the email address you'd like notifications sent to.
-
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.
-
在任意页面的右上角,单击 。
-
在左侧边栏中的存储库列表下,使用“管理通知”下拉按钮单击“通知设置”。
-
Under "Custom routing," find your organization's name in the list.
-
Click Edit next to the email address you want to change.
-
Select one of your verified email addresses, then click Save.
Dependabot alerts notification options
The notification options for your user account are available at https://github.com/settings/notifications. You can configure notification settings for each repository, in the repository watch settings.
若要在存储库上接收有关 Dependabot alerts} 的通知,需要监视这些存储库,并订阅以接收“所有活动”通知或配置自定义设置以包括“安全警报”。 有关详细信息,请参阅“Configuring notifications”。 可以选择通知的传递方法,以及通知发送给你的频率。 默认情况下,如果企业所有者在实例上已配置通知电子邮件,你将收到 Dependabot alerts:
- 在你的收件箱中,作为 Web 通知。 当为存储库启用 Dependabot、将新的清单文件提交到存储库以及发现具有极高或高严重性的新漏洞时,将发送一条 Web 通知(GitHub 选项)。
- 通过电子邮件。 当为存储库启用 Dependabot、将新的清单文件提交到存储库以及发现具有极高或高严重性的新漏洞时,将发送一封电子邮件(“电子邮件”选项)。
- 在命令行上。 当推送到具有任何不安全依赖项的存储库(“CLI”选项)时,警告会显示为回调。
- 在 GitHub Mobile 上,作为 Web 通知。 有关详细信息,请参阅“Configuring notifications”。
注意
电子邮件和网页/GitHub Mobile 通知是:
- 按存储库:在存储库中启用 Dependabot 时,或者当新的清单文件提交到存储库时。
- 按组织:当发现新的漏洞时。
- 当发现新的漏洞时发送。 GitHub 在更新漏洞时不会发送通知。
可以自定义有关 Dependabot alerts 的通知方式。 例如,可以使用“以电子邮件发送漏洞摘要”和“每周安全性电子邮件摘要”选项通过电子邮件接收最多 10 个存储库的每周警报摘要 。
For more information about the notification delivery methods available to you, and advice on optimizing your notifications for Dependabot alerts, see 为 Dependabot 警报配置通知.
Secret scanning notification options
当检测到新的机密时,GitHub 会根据用户的通知首选项,通知对仓库的安全性警报具有访问权限的所有用户。 这些用户包括:
- 存储库管理员
- 安全管理员
- 拥有自定义角色(具有读取/写入访问权限)的用户
- 组织所有者和企业所有者(如果他们是机密泄露的存储库的管理员)
注意
无论通知首选项如何,系统都会通知意外提交机密的提交作者。
你将收到电子邮件通知,前提是:
- 你正在监视存储库。
- 已为“所有活动”或存储库上的自定义“安全警报”启用通知。
- 在通知设置中“订阅”下的“监视”下,你已选择通过电子邮件接收通知。
For more information on how to configure notifications for 机密扫描警报, see 监视来自机密扫描的警报.
GitHub Actions notification options
For repositories that are set up with GitHub Actions and that you are watching, you can choose how you want to receive workflow run updates.
On the "Notification settings" page, select "Email" or "Web" notifications. Optionally, to only receive notifications for failed workflow runs, select "Send notifications for failed workflows only".
Organization alerts notification options
If you're an organization owner, you'll receive email notifications by default when organization members add new deploy keys to repositories within the organization. You can unsubscribe from these notifications. On the notification settings page, under "Organization alerts", deselect Email.
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
- In the bottom menu, tap Profile.
- To view your settings, tap .
- To update your notification settings, tap Notifications and then use the toggles to enable or disable your preferred types of push notifications.
- 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
- In the bottom menu, tap Profile.
- To view your settings, tap .
- To update your notification settings, tap Configure Notifications and then use the toggles to enable or disable your preferred types of push notifications.
- 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.
- On GitHub Mobile, navigate to the main page of the repository.
- Tap Watch.
- To choose what activities you receive notifications for, tap your preferred watch settings. For example, choose to only be notified when you are participating or @mentioned, or use the "Custom" option to select specific events that you want to be notified of.