diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-20 10:00:54 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-20 10:00:54 +0000 |
commit | 3cccd102ba543e02725d247893729e5c73b38295 (patch) | |
tree | f36a04ec38517f5deaaacb5acc7d949688d1e187 /app/graphql/mutations/ci/job/retry.rb | |
parent | 205943281328046ef7b4528031b90fbda70c75ac (diff) | |
download | gitlab-ce-3cccd102ba543e02725d247893729e5c73b38295.tar.gz |
Add latest changes from gitlab-org/gitlab@14-10-stable-eev14.10.0-rc42
Diffstat (limited to 'app/graphql/mutations/ci/job/retry.rb')
-rw-r--r-- | app/graphql/mutations/ci/job/retry.rb | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/app/graphql/mutations/ci/job/retry.rb b/app/graphql/mutations/ci/job/retry.rb index 9af357ab216..50e9c51c9e7 100644 --- a/app/graphql/mutations/ci/job/retry.rb +++ b/app/graphql/mutations/ci/job/retry.rb @@ -17,11 +17,19 @@ module Mutations job = authorized_find!(id: id) project = job.project - ::Ci::RetryBuildService.new(project, current_user).execute(job) - { - job: job, - errors: errors_on_object(job) - } + response = ::Ci::RetryJobService.new(project, current_user).execute(job) + + if response.success? + { + job: response[:job], + errors: [] + } + else + { + job: nil, + errors: [response.message] + } + end end end end |