Open-Source Wikis

/

GitLab

/

Features

/

Notifications

gitlab-org/gitlab

Notifications

Email, in-app todos, and the rules that decide who hears about what.

Source

Concern Location
Settings model app/models/notification_setting.rb
Recipient resolution app/services/notification_recipients/
Notification service entry point app/services/notification_service.rb (~37K LoC)
Email mailers app/mailers/, app/mailers/emails/, ee/app/mailers/
Todos app/services/todo_service.rb, app/services/todos/
Email reply via mailroom lib/gitlab/email/, config/mail_room.yml

Notification preferences

Each User has a global notification level plus per-group / per-project overrides:

  • disabled
  • participating (default)
  • mention
  • watch (everything)
  • global (defer to upstream level)
  • custom (per-event flags)

NotificationSetting rows store overrides; the resolver merges global + overrides per recipient.

Recipient resolver

NotificationRecipients::* walks an action (e.g. "merge request reopened") and computes the recipients. It considers:

  • The actor (sender) — usually excluded from recipients.
  • The notification subscribers (issue watchers, MR participants).
  • The notification level for each.
  • Mute / unsubscribe state.
  • Confidentiality: confidential issues are gated to project members.

The resolver returns recipients grouped by notification reason ("subscribed", "mentioned", "assigned", etc.).

Mailers

app/mailers/notify.rb is the master mailer; specific events route to methods like new_issue_email, note_email, merged_merge_request_email. Each mailer renders an HAML template plus a text alternative under app/views/notify/.

Email reply

GitLab supports reply-by-email for issues, MRs, and notes:

  • mail_room reads incoming mail (config/mail_room.yml).
  • Gitlab::Email::* parses the body, extracts the reply token, and posts a comment.

Todos

Todos are an in-app inbox:

  • Todo rows are created by TodoService (app/services/todo_service.rb) when a user is assigned, mentioned, or asked to review.
  • Users see their pending todos in the "Todos" UI.
  • Todos can be marked done, snoozed, or dismissed.

Push notifications

For mobile push (limited): Gitlab::PushNotifications. Optional, disabled by default.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Notifications – GitLab wiki | Factory