[go: up one dir, main page]

Skip to content

User still receiving email notifications about reviewer changes after unsubscribing from a merge request

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

User still receiving email notifications about reviewer changes after unsubscribing from a merge request

Steps to reproduce

Unclear! In general:

  1. Create an MR
  2. Set a user as a reviewer
  3. Clear that user from the reviewer list

Example situation

@annabeldunstone unsubscribed from !171943 (merged) around Nov 7, yet received email notifications about actions happening on the MR on Nov 14.

image

"Seems to be just reviewers. I have a bunch of emails from unsubscribed MRs that only mention reviewers being added/removed. No emails about merging, comments, etc. Cool bug!"

What is the current bug behavior?

  • After unsubscribing, the user is still receiving email notifications about reviewer changes on the merge request

What is the expected correct behavior?

  • After unsubscribing, the user should only receive email notifications about direct mentions.
    • This includes assignment and review requests for the user, but does not include assignment or review requests to other users.

Relevant logs and/or screenshots

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

I have a suspicion about the issue here then. We send emails on "mentions" even if the user is unsubscribed. The reviewer email logic may see you as "mentioned" in these reviewer changes since you were one at some point.

Likely here: https://gitlab.com/gitlab-org/gitlab/-/blob/4f98c7770ab52191ff70a1da598a57a03459bd5d/app/services/merge_requests/base_service.rb#L81. old_reviewers is coming from https://gitlab.com/gitlab-org/gitlab/-/blob/d07effe7a35c911e429e0964ded79b8edb049bf8/app/services/merge_requests/update_reviewers_service.rb#L8 – which is just all reviewers on the MR.

Edited by 🤖 GitLab Bot 🤖