diff options
Diffstat (limited to 'app/graphql/mutations/ci/ci_cd_settings_update.rb')
-rw-r--r-- | app/graphql/mutations/ci/ci_cd_settings_update.rb | 37 |
1 files changed, 2 insertions, 35 deletions
diff --git a/app/graphql/mutations/ci/ci_cd_settings_update.rb b/app/graphql/mutations/ci/ci_cd_settings_update.rb index dec90ced962..98b8e9567e7 100644 --- a/app/graphql/mutations/ci/ci_cd_settings_update.rb +++ b/app/graphql/mutations/ci/ci_cd_settings_update.rb @@ -2,42 +2,9 @@ module Mutations module Ci - class CiCdSettingsUpdate < BaseMutation + # TODO: Remove in 16.0, see https://gitlab.com/gitlab-org/gitlab/-/merge_requests/87002 + class CiCdSettingsUpdate < ProjectCiCdSettingsUpdate graphql_name 'CiCdSettingsUpdate' - - include FindsProject - - authorize :admin_project - - argument :full_path, GraphQL::Types::ID, - required: true, - description: 'Full Path of the project the settings belong to.' - - argument :keep_latest_artifact, GraphQL::Types::Boolean, - required: false, - description: 'Indicates if the latest artifact should be kept for this project.' - - argument :job_token_scope_enabled, GraphQL::Types::Boolean, - required: false, - description: 'Indicates CI job tokens generated in this project have restricted access to resources.' - - field :ci_cd_settings, - Types::Ci::CiCdSettingType, - null: false, - description: 'CI/CD settings after mutation.' - - def resolve(full_path:, **args) - project = authorized_find!(full_path) - settings = project.ci_cd_settings - settings.update(args) - - { - ci_cd_settings: settings, - errors: errors_on_object(settings) - } - end end end end - -Mutations::Ci::CiCdSettingsUpdate.prepend_mod_with('Mutations::Ci::CiCdSettingsUpdate') |