Commit dd081481 authored by Nick Thomas's avatar Nick Thomas Committed by Yorick Peterse

Remove approver details from added-approve emails

parent e8d813ac
......@@ -57,6 +57,10 @@ module EE
::ApproverGroup.filtered_approver_groups(merge_request.approver_groups, current_user)
end
def suggested_approvers
merge_request.approval_state.suggested_approvers(current_user: current_user)
end
private
def expose_mr_approval_path?
......
......@@ -2,4 +2,4 @@
- return unless presenter.approvers.any?
%p
Approvers: #{render_items_list(presenter.approvers_left.map(&:name))}
Approvers: #{render_items_list(presenter.suggested_approvers.map(&:name))}
<%- presenter = local_assigns.fetch(:presenter) -%>
<%- return unless presenter.approvers.any? -%>
Approvers: <%= render_items_list(presenter.approvers_left.map(&:name)) %>
Approvers: <%= render_items_list(presenter.suggested_approvers.map(&:name)) %>
......@@ -121,6 +121,16 @@ describe MergeRequestPresenter do
end
end
describe '#suggested_approvers' do
subject { described_class.new(merge_request, current_user: user).suggested_approvers }
it 'delegates to the approval state' do
expect(merge_request.approval_state).to receive(:suggested_approvers).with(current_user: user) { [:ok] }
is_expected.to contain_exactly(:ok)
end
end
describe 'create vulnerability feedback paths' do
where(:create_feedback_path) do
[
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment