diff options
Diffstat (limited to 'app/graphql/mutations/ci/pipeline_cancel.rb')
-rw-r--r-- | app/graphql/mutations/ci/pipeline_cancel.rb | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/app/graphql/mutations/ci/pipeline_cancel.rb b/app/graphql/mutations/ci/pipeline_cancel.rb deleted file mode 100644 index bc881e2ac02..00000000000 --- a/app/graphql/mutations/ci/pipeline_cancel.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -module Mutations - module Ci - class PipelineCancel < Base - graphql_name 'PipelineCancel' - - authorize :update_pipeline - - def resolve(id:) - pipeline = authorized_find!(id: id) - - if pipeline.cancelable? - pipeline.cancel_running - { success: true, errors: [] } - else - { success: false, errors: ['Pipeline is not cancelable'] } - end - end - end - end -end |