Skip to content

Send notification emails when users are newly mentioned in issue or MR edits

What does this MR do?

Introduces "new mention in issue" and "new mention in MR" email notifications. Editing a Mentionable title or description and adding a mention to a user who was not previously mentioned will now send them a notification email, following usual permissions for doing so.

Are there points in the code the reviewer needs to double check?

  • I'm not too familiar with the notification levels - are these notifications going to go to the right people?
  • The naming is somewhat sketchy. "new mention in issue" is very cumbersome.
  • Are the tests sufficient?
  • Is it time for a refactor of notification_service.rb and tests? Should that be done as part of this MR?

Arguably, we should introduce 'updated' notification events so that all participating users get notifications when issue / MR text is updated, instead of just new mentions. I discussed this with @DouweM who preferred only notifying new mentions, so that's what we have here.

Why was this MR needed?

Issues & MRs may be edited to include mentions to new people. We don't currently send out email notifications of these edits to anyone, although they do create TODOs. This brings email notifications into parity with TODOs.

What are the relevant issue numbers?

Closes #2451 (closed)

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

Merge request reports