diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-03 15:10:11 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-03 15:10:11 +0000 |
commit | 4eef6c2c97b50f2305c561f0e1c6f0e14e661642 (patch) | |
tree | 03901d23471c6ad7984f8164297b13725adcd8fb /app/graphql/mutations | |
parent | b9ae930d02bebaadcd6f019b59240f1304822ef8 (diff) | |
download | gitlab-ce-4eef6c2c97b50f2305c561f0e1c6f0e14e661642.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/graphql/mutations')
-rw-r--r-- | app/graphql/mutations/ci/job/play.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/app/graphql/mutations/ci/job/play.rb b/app/graphql/mutations/ci/job/play.rb index 99f62ea3e70..8bb69119a44 100644 --- a/app/graphql/mutations/ci/job/play.rb +++ b/app/graphql/mutations/ci/job/play.rb @@ -11,13 +11,21 @@ module Mutations null: true, description: 'Job after the mutation.' + argument :variables, [::Types::Ci::VariableInputType], + required: false, + default_value: [], + replace_null_with_default: true, + description: 'Variables to use when playing a manual job.' + authorize :update_build - def resolve(id:) + def resolve(id:, variables:) job = authorized_find!(id: id) project = job.project + variables = variables.map(&:to_h) + + ::Ci::PlayBuildService.new(project, current_user).execute(job, variables) - ::Ci::PlayBuildService.new(project, current_user).execute(job) { job: job, errors: errors_on_object(job) |