summaryrefslogtreecommitdiff
path: root/app/finders/ci/pipelines_finder.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/finders/ci/pipelines_finder.rb')
-rw-r--r--app/finders/ci/pipelines_finder.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/finders/ci/pipelines_finder.rb b/app/finders/ci/pipelines_finder.rb
index 712d5f8c6fb..4c47517299a 100644
--- a/app/finders/ci/pipelines_finder.rb
+++ b/app/finders/ci/pipelines_finder.rb
@@ -36,6 +36,7 @@ module Ci
items = by_yaml_errors(items)
items = by_updated_at(items)
items = by_source(items)
+ items = by_name(items)
sort_items(items)
end
@@ -152,6 +153,15 @@ module Ci
items
end
+ def by_name(items)
+ return items unless
+ Feature.enabled?(:pipeline_name, project) &&
+ Feature.enabled?(:pipeline_name_search, project) &&
+ params[:name].present?
+
+ items.for_name(params[:name])
+ end
+
# rubocop: disable CodeReuse/ActiveRecord
def sort_items(items)
order_by = if ALLOWED_INDEXED_COLUMNS.include?(params[:order_by])