Skip to content

To-Do notifications that `set you as an approver` are spammy

Problem to solve

As soon as a merge request is created, if there are project approval rules, the approvers are automatically notified. This is noise when following common development practices where engineers open a merge request early.

The notification is very unnecessary given there is a dedicated reviewers feature where I can request a review, and even request another review https://about.gitlab.com/releases/2021/02/22/gitlab-13-9-released/#request-a-follow-up-review-from-a-reviewer.

Proposal

Do not notify default approvers when a new merge request is created.

This change should be made with a feature flag that allows us to modify the behavior for users.

Additional Details

It looks like the logic to trigger a To-Do for a possible approval was added as part of !547 (merged) with the note of:

A todo for approvers on MR creation. (They already get an email, as they are participants in the MR.)

We stopped adding approvers as participants in #616 (closed), which likely stopped the email notification, but we didn't also remove the To-Do notification when that happened.

Implementation Plan

  • backend modify TodoService#new_issuable method to disable creating todo when feature flag is enabled:
    def new_issuable(issuable, author)
      if issuable.is_a?(MergeRequest) && Feature.disabled?(:disable_todo_for_approvers)
        approvers = issuable.overall_approvers(exclude_code_owners: true)
        create_approval_required_todos(issuable, approvers, author)
      end

      super
    end
Edited by Alan (Maciej) Paruszewski