debian-mirror-gitlab/doc/user/profile/notifications.md

427 lines
25 KiB
Markdown
Raw Normal View History

2019-12-26 22:10:19 +05:30
---
disqus_identifier: 'https://docs.gitlab.com/ee/workflow/notifications.html'
2020-06-23 00:09:42 +05:30
stage: Plan
group: Project Management
2022-11-25 23:54:43 +05:30
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
2019-12-26 22:10:19 +05:30
---
2021-11-11 11:23:49 +05:30
# Notification emails **(FREE)**
2019-12-26 22:10:19 +05:30
2022-08-27 11:52:29 +05:30
> - Enhanced email styling [introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/78604) in GitLab 14.9 [with a feature flag](../../administration/feature_flags.md) named `enhanced_notify_css`. Disabled by default.
> - Enhanced email styling [enabled on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/issues/355907) in GitLab 14.9.
> - Enhanced email styling [enabled on self-managed](https://gitlab.com/gitlab-org/gitlab/-/issues/355907) in GitLab 15.0.
2022-07-16 23:28:13 +05:30
2021-11-11 11:23:49 +05:30
Stay informed about what's happening in GitLab with email notifications.
You can receive updates about activity in issues, merge requests, epics, and designs.
2019-12-26 22:10:19 +05:30
2021-11-11 11:23:49 +05:30
For the tool that GitLab administrators can use to send messages to users, read
2022-06-21 17:19:12 +05:30
[Email from GitLab](../admin_area/email_from_gitlab.md).
2021-04-29 21:17:54 +05:30
2021-11-18 22:05:49 +05:30
## Who receives notifications
2019-12-26 22:10:19 +05:30
2021-11-18 22:05:49 +05:30
When notifications are enabled for an issue, merge request, or epic, GitLab notifies you of actions
that happen there.
2019-12-26 22:10:19 +05:30
2021-11-18 22:05:49 +05:30
You might receive notifications for one of the following reasons:
2019-12-26 22:10:19 +05:30
2021-11-18 22:05:49 +05:30
- You participate in an issue, merge request, epic, or design. You become a participant when you comment
2022-06-21 17:19:12 +05:30
or edit, or someone mentions <sup>1</sup> you.
2021-11-18 22:05:49 +05:30
- You've [enabled notifications in an issue, merge request, or epic](#notifications-on-issues-merge-requests-and-epics).
- You've configured notifications for the [project](#change-level-of-project-notifications) or [group](#group-notifications).
2022-07-16 23:28:13 +05:30
- You're subscribed to group or project pipeline notifications via the pipeline emails [integration](../project/integrations/index.md).
2019-12-26 22:10:19 +05:30
2022-06-21 17:19:12 +05:30
1. GitLab doesn't send a notification when
[a comment is edited to include a user mention](../discussions/index.md#editing-a-comment-to-add-a-mention).
2021-02-22 17:27:13 +05:30
NOTE:
2021-11-11 11:23:49 +05:30
Administrators can block notifications, preventing them from being sent.
2019-12-26 22:10:19 +05:30
2021-11-18 22:05:49 +05:30
## Edit notification settings
2019-12-26 22:10:19 +05:30
2021-11-11 11:23:49 +05:30
Getting many notifications can be overwhelming. You can tune the notifications you receive.
2021-03-11 19:13:27 +05:30
For example, you might want to be notified about all activity in a specific project.
2021-11-11 11:23:49 +05:30
For other projects, you only want to be notified when you are mentioned by name.
2019-12-26 22:10:19 +05:30
2021-11-11 11:23:49 +05:30
These notification settings apply only to you. They do not affect the notifications received by
2021-11-18 22:05:49 +05:30
anyone else.
2019-12-26 22:10:19 +05:30
To edit your notification settings:
2021-06-02 17:11:27 +05:30
1. In the top-right corner, select your avatar.
1. Select **Preferences**.
2021-11-11 11:23:49 +05:30
1. On the left sidebar, select **Notifications**.
2021-11-18 22:05:49 +05:30
1. Edit the desired global, group, or project notification settings.
Edited settings are automatically saved.
2019-12-26 22:10:19 +05:30
2021-11-18 22:05:49 +05:30
### Notification scope
2021-11-11 11:23:49 +05:30
2021-11-18 22:05:49 +05:30
You can tune the scope of your notifications by selecting different notification levels for each
project and group.
2019-12-26 22:10:19 +05:30
2021-11-11 11:23:49 +05:30
Notification scope is applied from the broadest to most specific levels:
2021-11-18 22:05:49 +05:30
- Your **global**, or _default_, notification level applies if you
2021-11-11 11:23:49 +05:30
have not selected a notification level for the project or group in which the activity occurred.
2021-11-18 22:05:49 +05:30
- Your **group** setting overrides your default setting.
- Your **project** setting overrides the group setting.
### Notification levels
For each project and group you can select one of the following levels:
| Level | Description |
| ----------- | ----------------------------------------------------------- |
| Global | Your global settings apply. |
| Watch | Receive notifications for any activity. |
| Participate | Receive notifications for threads you have participated in. |
2022-01-26 12:08:38 +05:30
| On mention | Receive notifications when you are [mentioned](../discussions/index.md#mentions) in a comment. |
2021-11-18 22:05:49 +05:30
| Disabled | Receive no notifications. |
| Custom | Receive notifications for selected events. |
2021-11-11 11:23:49 +05:30
### Global notification settings
2019-12-26 22:10:19 +05:30
2021-04-29 21:17:54 +05:30
Your **Global notification settings** are the default settings unless you select
different values for a project or a group.
2019-12-26 22:10:19 +05:30
2021-06-02 17:11:27 +05:30
- **Notification email**: the email address your notifications are sent to.
2021-11-11 11:23:49 +05:30
Defaults to your primary email address.
2021-10-27 15:23:28 +05:30
- **Receive product marketing emails**: select this checkbox to receive
2021-11-18 22:05:49 +05:30
[periodic emails](#opt-out-of-product-marketing-emails) about GitLab features.
2021-06-02 17:11:27 +05:30
- **Global notification level**: the default [notification level](#notification-levels)
2021-04-29 21:17:54 +05:30
which applies to all your notifications.
2021-10-27 15:23:28 +05:30
- **Receive notifications about your own activity**: select this checkbox to receive
2021-04-29 21:17:54 +05:30
notifications about your own activity. Not selected by default.
2019-12-26 22:10:19 +05:30
2021-11-11 11:23:49 +05:30
### Group notifications
2019-12-26 22:10:19 +05:30
2021-11-11 11:23:49 +05:30
You can select a notification level and email address for each group.
2019-12-26 22:10:19 +05:30
2021-11-18 22:05:49 +05:30
#### Change level of group notifications
2019-12-26 22:10:19 +05:30
2021-11-11 11:23:49 +05:30
To select a notification level for a group, use either of these methods:
2019-12-26 22:10:19 +05:30
2021-06-02 17:11:27 +05:30
1. In the top-right corner, select your avatar.
1. Select **Preferences**.
2021-11-11 11:23:49 +05:30
1. On the left sidebar, select **Notifications**.
1. Locate the project in the **Groups** section.
2019-12-26 22:10:19 +05:30
1. Select the desired [notification level](#notification-levels).
Or:
2022-10-11 01:57:18 +05:30
1. On the top bar, select **Main menu > Groups** and find your group.
2023-01-13 00:05:48 +05:30
1. Select the notification dropdown list, next to the bell icon (**{notifications}**).
2019-12-26 22:10:19 +05:30
1. Select the desired [notification level](#notification-levels).
2021-11-18 22:05:49 +05:30
#### Change email address used for group notifications
2020-05-24 23:13:21 +05:30
2021-11-18 22:05:49 +05:30
> Introduced in GitLab 12.0.
2019-12-26 22:10:19 +05:30
2021-11-18 22:05:49 +05:30
You can select an email address to receive notifications for each group you belong to.
You can use group notifications, for example, if you work freelance, and want to keep email about clients' projects separate.
2019-12-26 22:10:19 +05:30
2021-11-11 11:23:49 +05:30
1. In the top-right corner, select your avatar.
1. Select **Preferences**.
1. On the left sidebar, select **Notifications**.
1. Locate the project in the **Groups** section.
1. Select the desired email address.
2019-12-26 22:10:19 +05:30
2021-11-18 22:05:49 +05:30
### Change level of project notifications
2019-12-26 22:10:19 +05:30
2021-11-18 22:05:49 +05:30
To help you stay up to date, you can select a notification level for each project.
2021-11-11 11:23:49 +05:30
To select a notification level for a project, use either of these methods:
2019-12-26 22:10:19 +05:30
2021-06-02 17:11:27 +05:30
1. In the top-right corner, select your avatar.
1. Select **Preferences**.
2021-11-11 11:23:49 +05:30
1. On the left sidebar, select **Notifications**.
1. Locate the project in the **Projects** section.
2019-12-26 22:10:19 +05:30
1. Select the desired [notification level](#notification-levels).
2021-11-11 11:23:49 +05:30
Or:
2019-12-26 22:10:19 +05:30
2022-10-11 01:57:18 +05:30
1. On the top bar, select **Main menu > Projects** and find your project.
2023-01-13 00:05:48 +05:30
1. Select the notification dropdown list, next to the bell icon (**{notifications}**).
2019-12-26 22:10:19 +05:30
1. Select the desired [notification level](#notification-levels).
2021-11-11 11:23:49 +05:30
<i class="fa fa-youtube-play youtube" aria-hidden="true"></i>
2021-11-18 22:05:49 +05:30
To learn how to be notified when a new release is available, watch [Notification for releases](https://www.youtube.com/watch?v=qyeNkGgqmH4).
2019-12-26 22:10:19 +05:30
2021-11-18 22:05:49 +05:30
### Opt out of product marketing emails
2021-06-02 17:11:27 +05:30
You can receive emails that teach you about various GitLab features.
2021-11-18 22:05:49 +05:30
These emails are enabled by default.
2021-06-02 17:11:27 +05:30
2021-11-18 22:05:49 +05:30
To opt out:
1. In the top-right corner, select your avatar.
1. Select **Preferences**.
1. On the left sidebar, select **Notifications**.
1. Clear the **Receive product marketing emails** checkbox.
Edited settings are automatically saved and enabled.
2021-06-02 17:11:27 +05:30
Disabling these emails does not disable all emails.
Learn how to [opt out of all emails from GitLab](#opt-out-of-all-gitlab-emails).
#### Self-managed product marketing emails **(FREE SELF)**
The self-managed installation generates and automatically sends these emails based on user actions.
Turning this on does not cause your GitLab instance or your company to send any personal information to
GitLab Inc.
An instance administrator can configure this setting for all users. If you choose to opt out, your
setting overrides the instance-wide setting, even when an administrator later enables these emails
for all users.
2019-12-26 22:10:19 +05:30
## Notification events
2021-02-22 17:27:13 +05:30
Users are notified of the following events:
2019-12-26 22:10:19 +05:30
2021-11-11 11:23:49 +05:30
<!-- The table is sorted first by recipient, then alphabetically. -->
2022-06-21 17:19:12 +05:30
| Event | Sent to | Settings level |
|------------------------------------------|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------|
| New release | Project members | Custom notification. |
| Project moved | Project members | Any other than disabled. |
| Email changed | User | Security email, always sent. |
| Group access level changed | User | Sent when user group access level is changed. |
| New email address added | User | Security email, sent to primary email address. _[Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/337635) in GitLab 14.9._ |
| New email address added | User | Security email, sent to newly-added email address. |
| New SAML/SCIM user provisioned | User | Sent when a user is provisioned through SAML/SCIM. _[Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/276018) in GitLab 13.8._ |
| New SSH key added | User | Security email, always sent. |
| New user created | User | Sent on user creation, except for OmniAuth (LDAP). |
| Password changed | User | Security email, always sent when user changes their own password. |
| Password changed by administrator | User | Security email, always sent when an administrator changes the password of another user. |
| Personal access tokens expiring soon | User | Security email, always sent. |
| Personal access tokens have been created | User | Security email, always sent. _[Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/337591) in GitLab 14.9._ |
| Personal access tokens have expired | User | Security email, always sent. |
2023-01-13 00:05:48 +05:30
| Personal access token has been revoked | User | Security email, always sent. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/98911) in GitLab 15.5. |
2022-06-21 17:19:12 +05:30
| Project access level changed | User | Sent when user project access level is changed. |
| SSH key has expired | User | Security email, always sent. _[Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/322637) in GitLab 13.12._ |
| Two-factor authentication disabled | User | Security email, always sent. |
| User added to group | User | Sent when user is added to group. |
| User added to project | User | Sent when user is added to project. |
2019-12-26 22:10:19 +05:30
2021-03-11 19:13:27 +05:30
## Notifications on issues, merge requests, and epics
2019-12-26 22:10:19 +05:30
2021-11-18 22:05:49 +05:30
You also receive notifications for events happening on
issues, merge requests, and epics.
2021-03-11 19:13:27 +05:30
2021-11-18 22:05:49 +05:30
### Who receives notifications on issues, merge requests, and epics
2021-03-11 19:13:27 +05:30
2021-11-18 22:05:49 +05:30
In issues, merge requests, and epics, for most events, the notification is sent to:
2019-12-26 22:10:19 +05:30
- Participants:
2021-11-18 22:05:49 +05:30
- The author and assignee.
2021-11-11 11:23:49 +05:30
- Authors of comments.
2022-01-26 12:08:38 +05:30
- Anyone [mentioned](../discussions/index.md#mentions) by username in the title
2021-11-18 22:05:49 +05:30
or description.
- Anyone mentioned by username in a comment if their notification level is "Participating" or higher.
2021-03-11 19:13:27 +05:30
- Watchers: users with notification level "Watch".
2021-11-18 22:05:49 +05:30
- Subscribers: anyone who manually subscribed to notifications.
- Custom: users with notification level "Custom" who turned on notifications for a fitting type of events.
2019-12-26 22:10:19 +05:30
2021-02-22 17:27:13 +05:30
NOTE:
2021-03-11 19:13:27 +05:30
To minimize the number of notifications that do not require any action, in
2021-11-18 22:05:49 +05:30
[GitLab 12.9 and later](https://gitlab.com/gitlab-org/gitlab/-/issues/616), eligible
approvers are no longer notified for all the activities in their projects. To turn on such notifications, they have
2021-03-11 19:13:27 +05:30
to change their user notification settings to **Watch** instead.
2021-11-18 22:05:49 +05:30
### Edit notification settings for issues, merge requests, and epics
2023-01-13 00:05:48 +05:30
To toggle notifications on an issue, merge request, or epic: on the right sidebar, turn on or off the **Notifications** toggle.
2021-11-18 22:05:49 +05:30
2023-01-13 00:05:48 +05:30
When you **turn on** notifications, you start receiving notifications on each update, even if you
haven't participated in the discussion.
When you turn notifications on in an epic, you aren't automatically subscribed to the issues linked
to the epic.
2021-11-18 22:05:49 +05:30
2023-01-13 00:05:48 +05:30
When you **turn off** notifications, you stop receiving notifications for updates.
Turning this toggle off only unsubscribes you from updates related to this issue, merge request, or epic.
Learn how to [opt out of all emails from GitLab](#opt-out-of-all-gitlab-emails).
2021-11-18 22:05:49 +05:30
2023-01-13 00:05:48 +05:30
<!-- Delete when the `moved_mr_sidebar` feature flag is removed -->
If you don't see this action on the right sidebar, your project or instance may have
enabled a feature flag for [moved sidebar actions](../project/merge_requests/index.md#move-sidebar-actions).
2021-11-18 22:05:49 +05:30
### Notification events on issues, merge requests, and epics
2021-03-11 19:13:27 +05:30
The following table presents the events that generate notifications for issues, merge requests, and
epics:
2020-04-08 14:13:33 +05:30
2019-12-26 22:10:19 +05:30
| Event | Sent to |
|------------------------|---------|
2022-06-21 17:19:12 +05:30
| Change milestone issue | Subscribers and participants mentioned. |
| Change milestone merge request | Subscribers and participants mentioned. |
2021-03-11 19:13:27 +05:30
| Close epic | |
2019-12-26 22:10:19 +05:30
| Close issue | |
2021-03-11 19:13:27 +05:30
| Close merge request | |
2021-11-18 22:05:49 +05:30
| Failed pipeline | The author of the pipeline. |
| Fixed pipeline | The author of the pipeline. Enabled by default. _[Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/24309) in GitLab 13.1._ |
2022-06-21 17:19:12 +05:30
| Issue due | Participants and Custom notification level with this event selected. |
2021-03-11 19:13:27 +05:30
| Merge merge request | |
2021-11-18 22:05:49 +05:30
| Merge when pipeline succeeds | Author, Participants, Watchers, Subscribers, and Custom notification level with this event selected. Custom notification level is ignored for Author, Watchers and Subscribers. _[Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/211961) in GitLab 13.4._ |
| Merge request [marked as ready](../project/merge_requests/drafts.md) | Watchers and participants. _[Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/15332) in GitLab 13.10._ |
2021-03-11 19:13:27 +05:30
| New epic | |
| New issue | |
2019-12-26 22:10:19 +05:30
| New merge request | |
2022-06-21 17:19:12 +05:30
| New note | Participants, Watchers, Subscribers, and Custom notification level with this event selected. Also anyone mentioned by username in the comment, with notification level "Mention" or higher. |
2021-11-18 22:05:49 +05:30
| Push to merge request | Participants and Custom notification level with this event selected. |
| Reassign issue | Participants, Watchers, Subscribers, Custom notification level with this event selected, and the old assignee. |
| Reassign merge request | Participants, Watchers, Subscribers, Custom notification level with this event selected, and the old assignee. |
2022-06-21 17:19:12 +05:30
| Remove milestone issue | Subscribers and participants mentioned. |
| Remove milestone merge request | Subscribers and participants mentioned. |
2021-03-11 19:13:27 +05:30
| Reopen epic | |
| Reopen issue | |
| Reopen merge request | |
2021-11-18 22:05:49 +05:30
| Successful pipeline | The author of the pipeline, with Custom notification level for successful pipelines. If the pipeline failed previously, a "Fixed pipeline" message is sent for the first successful pipeline after the failure, and then a "Successful pipeline" message for any further successful pipelines. |
2019-12-26 22:10:19 +05:30
2021-03-11 19:13:27 +05:30
If the title or description of an issue or merge request is
2021-11-18 22:05:49 +05:30
changed, notifications are sent to any **new** mentions by username as
2019-12-26 22:10:19 +05:30
if they had been mentioned in the original text.
2021-02-22 17:27:13 +05:30
If an open merge request becomes unmergeable due to conflict, its author is notified about the cause.
2021-11-11 11:23:49 +05:30
If a user has also set the merge request to automatically merge when pipeline succeeds,
2021-02-22 17:27:13 +05:30
then that user is also notified.
2019-12-26 22:10:19 +05:30
2021-11-18 22:05:49 +05:30
By default, you don't receive notifications for issues, merge requests, or epics created by yourself.
To always receive notifications on your own issues, merge requests, and so on, turn on
[notifications about your own activity](#global-notification-settings).
2022-11-25 23:54:43 +05:30
## Notifications for unknown sign-ins
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/27211) in GitLab 13.0.
NOTE:
This feature is enabled by default for self-managed instances. Administrators may disable this feature
through the [Sign-in restrictions](../admin_area/settings/sign_in_restrictions.md#email-notification-for-unknown-sign-ins) section of the UI.
The feature is always enabled on GitLab.com.
When a user successfully signs in from a previously unknown IP address or device,
GitLab notifies the user by email. In this way, GitLab proactively alerts users of potentially
malicious or unauthorized sign-ins.
GitLab uses several methods to identify a known sign-in. All methods must fail for a notification email to be sent.
- Last sign-in IP: The current sign-in IP address is checked against the last sign-in
IP address.
- Current active sessions: If the user has an existing active session from the
same IP address. See [Active Sessions](active_sessions.md).
- Cookie: After successful sign in, an encrypted cookie is stored in the browser.
This cookie is set to expire 14 days after the last successful sign in.
## Notifications for attempted sign-in using wrong two-factor authentication codes
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/374740) in GitLab 15.5.
GitLab sends you an email notification if it detects an attempt to sign in to your account using a wrong two-factor
authentication (2FA) code. This can help you detect that a bad actor gained access to your username and password, and is trying
to brute force 2FA.
2021-11-11 11:23:49 +05:30
## Notifications on designs
2021-01-29 00:20:46 +05:30
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/217095) in GitLab 13.6.
2021-11-18 22:05:49 +05:30
Email notifications are sent to the participants when someone comments on a design.
2021-01-29 00:20:46 +05:30
The participants are:
- Authors of the design (can be multiple people if different authors have uploaded different versions of the design).
- Authors of comments on the design.
2022-01-26 12:08:38 +05:30
- Anyone that is [mentioned](../discussions/index.md#mentions) in a comment on the design.
2021-01-29 00:20:46 +05:30
2021-06-02 17:11:27 +05:30
## Opt out of all GitLab emails
If you no longer wish to receive any email notifications:
2021-11-18 22:05:49 +05:30
1. In the top-right corner, select your avatar.
1. Select **Preferences**.
1. On the left sidebar, select **Notifications**.
2021-06-02 17:11:27 +05:30
1. Clear the **Receive product marketing emails** checkbox.
1. Set your **Global notification level** to **Disabled**.
1. Clear the **Receive notifications about your own activity** checkbox.
1. If you belong to any groups or projects, set their notification setting to **Global** or
**Disabled**.
On self-managed installations, even after doing this, your instance administrator
2022-06-21 17:19:12 +05:30
[can still email you](../admin_area/email_from_gitlab.md).
2021-06-02 17:11:27 +05:30
To unsubscribe, select the unsubscribe link in one of these emails.
2021-11-18 22:05:49 +05:30
## Email headers you can use to filter email
Notification email messages include GitLab-specific headers. To better manage your notifications,
you can filter the notification emails based on the content of these headers.
2019-12-26 22:10:19 +05:30
2021-11-18 22:05:49 +05:30
For example, you could filter all emails from a specific project where you are being assigned a
a merge request or an issue.
2020-03-13 15:44:24 +05:30
The following table lists all GitLab-specific email headers:
2019-12-26 22:10:19 +05:30
2022-01-26 12:08:38 +05:30
| Header | Description |
2023-01-13 00:05:48 +05:30
| ------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
2022-01-26 12:08:38 +05:30
| `List-Id` | The path of the project in an RFC 2919 mailing list identifier. You can use it for email organization with filters. |
| `X-GitLab-(Resource)-ID` | The ID of the resource the notification is for. The resource, for example, can be `Issue`, `MergeRequest`, `Commit`, or another such resource. |
| `X-GitLab-Discussion-ID` | The ID of the thread the comment belongs to, in notification emails for comments. |
| `X-GitLab-Group-Id` | The group's ID. Only present on notification emails for [epics](../group/epics/index.md). |
| `X-GitLab-Group-Path` | The group's path. Only present on notification emails for [epics](../group/epics/index.md) |
2023-01-13 00:05:48 +05:30
| `X-GitLab-NotificationReason` | The reason for the notification. [See possible values.](#x-gitlab-notificationreason). |
2022-01-26 12:08:38 +05:30
| `X-GitLab-Pipeline-Id` | The ID of the pipeline the notification is for, in notification emails for pipelines. |
| `X-GitLab-Project-Id` | The project's ID. |
| `X-GitLab-Project-Path` | The project's path. |
| `X-GitLab-Project` | The name of the project the notification belongs to. |
| `X-GitLab-Reply-Key` | A unique token to support reply by email. |
2019-12-26 22:10:19 +05:30
### X-GitLab-NotificationReason
2021-11-18 22:05:49 +05:30
The `X-GitLab-NotificationReason` header contains the reason for the notification.
The value is one of the following, in order of priority:
2019-12-26 22:10:19 +05:30
- `own_activity`
- `assigned`
2023-01-13 00:05:48 +05:30
- `review_requested`
2019-12-26 22:10:19 +05:30
- `mentioned`
2023-01-13 00:05:48 +05:30
- `subscribed`
2019-12-26 22:10:19 +05:30
2021-11-18 22:05:49 +05:30
The reason for the notification is also included in the footer of the notification email.
For example, an email with the reason `assigned` has this sentence in the footer:
2020-03-13 15:44:24 +05:30
2021-11-18 22:05:49 +05:30
> You are receiving this email because you have been assigned an item on \<configured GitLab hostname>.
2021-10-27 15:23:28 +05:30
2023-01-13 00:05:48 +05:30
#### On-call alerts notifications **(PREMIUM)**
An [on-call alert](../../operations/incident_management/oncall_schedules.md)
notification email can have one of [the alert's](../../operations/incident_management/alerts.md) statuses:
2021-10-27 15:23:28 +05:30
- `alert_triggered`
- `alert_acknowledged`
- `alert_resolved`
- `alert_ignored`
2021-11-18 22:05:49 +05:30
2023-01-13 00:05:48 +05:30
#### Incident escalation notifications **(PREMIUM)**
An [incident escalation](../../operations/incident_management/escalation_policies.md)
notification email can have one of [the incident's](../../operations/incident_management/incidents.md) status:
- `incident_triggered`
- `incident_acknowledged`
- `incident_resolved`
- `incident_ignored`
2021-11-18 22:05:49 +05:30
Expanding the list of events included in the `X-GitLab-NotificationReason` header is tracked in
[issue 20689](https://gitlab.com/gitlab-org/gitlab/-/issues/20689).
2021-12-11 22:18:48 +05:30
## Troubleshooting
### Pull a list of recipients for notifications
If you want to pull a list of recipients to receive notifications from a project
(mainly used for troubleshooting custom notifications),
in a Rails console, run `sudo gitlab-rails c` and be sure to update the project name:
```plaintext
project = Project.find_by_full_path '<project_name>'
merge_request = project.merge_requests.find_by(iid: 1)
current_user = User.first
recipients = NotificationRecipients::BuildService.build_recipients(merge_request, current_user, action: "push_to"); recipients.count
recipients.each { |notify| puts notify.user.username }
```