Skip to content

Update reference to approvers field on merge_request presenter

What does this MR do and why?

After we make approvers and approver_groups returning empty array behind FF, we have found another place that still reference on approvers on merge_request presenter.

In this MR, we update this code to use latest implementation approval_rules.

approvers were previous deprecated implementation, and are being replaced by approval_rules.

Currently, method suggested_approvers still in use, and is using approval_rules.users

https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/app/models/approval_state.rb#L194

References

Screenshots or screen recordings

N/A, simple condition checked update

How to set up and validate locally

This html content could be checked by Notify.new_merge_request_email(User.first, MergeRequest.last).deliver_now. Then this is part of the email html content.

If would like to verify, could make Approver and ApprovalMergeRequestRule with association to current MR locally, and see content being displayed.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by zli

Merge request reports

Loading