diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-13 12:08:20 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-13 12:08:20 +0300 |
commit | 2d8c28f1d32709280506507f3b6e6d2da7440da9 (patch) | |
tree | 9ed8319e6cdddd1e03493b82c552ec8df590027f /app/finders | |
parent | 99bb3eedd09ba55be5934da8138e2678a3e1be4d (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/finders')
-rw-r--r-- | app/finders/ci/jobs_finder.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/finders/ci/jobs_finder.rb b/app/finders/ci/jobs_finder.rb index 2ad62659451..1627e41a02d 100644 --- a/app/finders/ci/jobs_finder.rb +++ b/app/finders/ci/jobs_finder.rb @@ -16,6 +16,7 @@ module Ci def execute builds = init_collection.order_id_desc + builds = filter_by_with_artifacts(builds) filter_by_scope(builds) rescue Gitlab::Access::AccessDeniedError type.none @@ -72,6 +73,14 @@ module Ci end end + def filter_by_with_artifacts(builds) + if params[:with_artifacts] + builds.with_erasable_artifacts + else + builds + end + end + def filter_by_statuses!(builds) unknown_statuses = params[:scope] - ::CommitStatus::AVAILABLE_STATUSES raise ArgumentError, 'Scope contains invalid value(s)' unless unknown_statuses.empty? |