Commit df22bdb3 authored by Douwe Maan's avatar Douwe Maan

Merge branch 'remove-unused-code-in-merge-requests-helper' into 'master'

Removes two unused methods from the EE::MergeRequestsHelper

See merge request gitlab-org/gitlab-ee!7364
parents 08a8e3b3 5b767410
......@@ -13,33 +13,5 @@ module EE
"#{items.join(", ")} #{separator} #{last_item}"
end
end
# This may be able to be removed with associated specs
def render_require_section(merge_request)
str = if merge_request.approvals_left == 1
"Requires one more approval"
else
"Requires #{merge_request.approvals_left} more approvals"
end
if merge_request.approvers_left.any?
more_approvals = merge_request.approvals_left - merge_request.approvers_left.count
approvers_names = merge_request.approvers_left.map(&:name)
str << approval_items(more_approvals, approvers_names)
end
str
end
def approval_items(more_approvals, approvers_names)
if more_approvals > 0
" (from #{render_items_list(approvers_names + ["#{more_approvals} more"])})"
elsif more_approvals < 0
" (from #{render_items_list(approvers_names, "or")})"
else
" (from #{render_items_list(approvers_names)})"
end
end
end
end
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