GitLab Notification Emails

GitLab has a notification system in place to notify a user of events that are important for the workflow.

Notification settings

You can find notification settings under the user profile.

notification settings

Notification settings are divided into three groups:

  • Global settings
  • Group settings
  • Project settings

Each of these settings have levels of notification:

  • Watch: Receive notifications for any activity.
  • On Mention: Receive notifications when @mentioned in comments.
  • Participate: Receive notifications for threads you have participated in.
  • Disabled: Turns off notifications.
  • Custom: Receive notifications for custom selected events.
  • Global: For groups and projects, notifications as per global settings.

Global Settings

Global settings are at the bottom of the hierarchy. Any setting set here will be overridden by a setting at the group or a project level.

Group or Project settings can use global notification setting which will then use anything that is set at Global Settings.

Group Settings

notification settings

Group settings are taking precedence over Global Settings but are on a level below Project or Subgroup settings:

Group < Subgroup < Project

This means that you can set a different level of notifications per group while still being able to have a finer level setting per project or subgroup. Organization like this is suitable for users that belong to different groups but don’t have the same need for being notified for every group they are member of. These settings can be configured on group page under the name of the group. It will be the dropdown with the bell icon. They can also be configured on the user profile notifications dropdown.

Project Settings

notification settings

Project settings are at the top level and any setting placed at this level will take precedence of any other setting. This is suitable for users that have different needs for notifications per project basis. These settings can be configured on project page under the name of the project. It will be the dropdown with the bell icon. They can also be configured on the user profile notifications dropdown.

Notification events

Below is the table of events users can be notified of:

EventSent toSettings level
New SSH key addedUserSecurity email, always sent.
New email addedUserSecurity email, always sent.
New user createdUserSent on user creation, except for omniauth (LDAP)
User added to projectUserSent when user is added to project
Project access level changedUserSent when user project access level is changed
User added to groupUserSent when user is added to group
Group access level changedUserSent when user group access level is changed
Project movedProject members [1][1] not disabled

Issue / Merge request events

In most of the below cases, the notification will be sent to:

  • Participants:
    • the author and assignee of the issue/merge request
    • authors of comments on the issue/merge request
    • anyone mentioned by @username in the issue/merge request title or description
    • anyone mentioned by @username in any of the comments on the issue/merge request …with notification level “Participating” or higher
  • Watchers: users with notification level “Watch”
  • Subscribers: anyone who manually subscribed to the issue/merge request
  • Custom: Users with notification level “custom” who turned on notifications for any of the events present in the table below
EventSent to
New issue 
Close issue 
Reassign issueThe above, plus the old assignee
Reopen issue 
Due issueParticipants and Custom notification level with this event selected
Change milestone issueSubscribers, participants mentioned, and Custom notification level with this event selected
Remove milestone issueSubscribers, participants mentioned, and Custom notification level with this event selected
New merge request 
Push to merge requestParticipants and Custom notification level with this event selected
Reassign merge requestThe above, plus the old assignee
Close merge request 
Reopen merge request 
Merge merge request 
Change milestone merge requestSubscribers, participants mentioned, and Custom notification level with this event selected
Remove milestone merge requestSubscribers, participants mentioned, and Custom notification level with this event selected
New commentThe above, plus anyone mentioned by @username in the comment, with notification level “Mention” or higher
Failed pipelineThe author of the pipeline
Successful pipelineThe author of the pipeline, if they have the custom notification setting for successful pipelines set
New epic 

In addition, if the title or description of an Issue or Merge Request is changed, notifications will be sent to any new mentions by @username as if they had been mentioned in the original text.

You won’t receive notifications for Issues, Merge Requests or Milestones created by yourself (except when an issue is due). You will only receive automatic notifications when somebody else comments or adds changes to the ones that you’ve created or mentions you.

If an open merge request becomes unmergeable due to conflict, its author will be notified about the cause. If a user has also set the merge request to automatically merge once pipeline succeeds, then that user will also be notified.

Email Headers

Notification emails include headers that provide extra content about the notification received:

HeaderDescription
X-GitLab-ProjectThe name of the project the notification belongs to
X-GitLab-Project-IdThe ID of the project
X-GitLab-Project-PathThe path of the project
X-GitLab-(Resource)-IDThe ID of the resource the notification is for, where resource is IssueMergeRequestCommit, etc
X-GitLab-Discussion-IDOnly in comment emails, the ID of the discussion the comment is from
X-GitLab-Pipeline-IdOnly in pipeline emails, the ID of the pipeline the notification is for
X-GitLab-Reply-KeyA unique token to support reply by email
X-GitLab-NotificationReasonThe reason for being notified. “mentioned”, “assigned”, etc
X-GitLab-NotificationReason

This header holds the reason for the notification to have been sent out, where reason can be mentionedassignedown_activity, etc. Only one reason is sent out according to its priority:

  • own_activity
  • assigned
  • mentioned

The reason in this header will also be shown in the footer of the notification email. For example an email with the reason assigned will have this sentence in the footer: "You are receiving this email because you have been assigned an item on {configured GitLab hostname}"

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值