Commit e815729d authored by Fabio Pitino's avatar Fabio Pitino

Merge branch 'lm-update-jobs-finder' into 'master'

Cleans up job finder

See merge request gitlab-org/gitlab!52780
parents 9f4230b0 8d606e4e
......@@ -49,7 +49,7 @@ module Ci
end
def filter_by_scope(builds)
return filter_by_statuses!(params[:scope], builds) if params[:scope].is_a?(Array)
return filter_by_statuses!(builds) if params[:scope].is_a?(Array)
case params[:scope]
when 'pending'
......@@ -63,7 +63,7 @@ module Ci
end
end
def filter_by_statuses!(statuses, builds)
def filter_by_statuses!(builds)
unknown_statuses = params[:scope] - ::CommitStatus::AVAILABLE_STATUSES
raise ArgumentError, 'Scope contains invalid value(s)' unless unknown_statuses.empty?
......
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