Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-07-01 12:07:33 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-07-01 12:07:33 +0300
commitf5eabcfa0e39e8212eb333d9e824294d14f530d5 (patch)
tree1a365d06c584e61b50ac3850b4058fd7826173c8 /app/finders
parent0537e77587de43e2b3c5cbd8610641b3003a9840 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/finders')
-rw-r--r--app/finders/merge_requests_finder.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/finders/merge_requests_finder.rb b/app/finders/merge_requests_finder.rb
index 19fcd91a5b8..e23fa3f7f68 100644
--- a/app/finders/merge_requests_finder.rb
+++ b/app/finders/merge_requests_finder.rb
@@ -76,6 +76,7 @@ class MergeRequestsFinder < IssuableFinder
def filter_negated_items(items)
items = super(items)
items = by_negated_reviewer(items)
+ items = by_negated_approved_by(items)
by_negated_target_branch(items)
end
@@ -119,6 +120,12 @@ class MergeRequestsFinder < IssuableFinder
end
# rubocop: enable CodeReuse/ActiveRecord
+ def by_negated_approved_by(items)
+ return items unless not_params[:approved_by_usernames]
+
+ items.not_approved_by_users_with_usernames(not_params[:approved_by_usernames])
+ end
+
def source_project_id
@source_project_id ||= params[:source_project_id].presence
end