diff options
author | Clement Ho <ClemMakesApps@gmail.com> | 2018-11-16 09:38:58 -0600 |
---|---|---|
committer | Clement Ho <ClemMakesApps@gmail.com> | 2018-11-16 09:38:58 -0600 |
commit | e5d4f7ff277289af8fbffd392bc216ffb2d1d873 (patch) | |
tree | 102f0a450c2476da80fa39649aed522c732b72f2 /lib/api | |
parent | 17d53e2bf5f9ec44d56bf92daf972007fc5f9bff (diff) | |
parent | 624ec62238c1d26ef2745c1147edffde67a2b4e6 (diff) | |
download | gitlab-ce-npm-namespace.tar.gz |
Merge branch 'master' into npm-namespacenpm-namespace
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/commits.rb | 2 | ||||
-rw-r--r-- | lib/api/pipelines.rb | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/lib/api/commits.rb b/lib/api/commits.rb index 3b8f3fedccf..337b92a6183 100644 --- a/lib/api/commits.rb +++ b/lib/api/commits.rb @@ -207,7 +207,7 @@ module API end desc 'Revert a commit in a branch' do - detail 'This feature was introduced in GitLab 11.6' + detail 'This feature was introduced in GitLab 11.5' success Entities::Commit end params do diff --git a/lib/api/pipelines.rb b/lib/api/pipelines.rb index 1cfb982c04b..cba1e3a6684 100644 --- a/lib/api/pipelines.rb +++ b/lib/api/pipelines.rb @@ -81,6 +81,21 @@ module API present pipeline, with: Entities::Pipeline end + desc 'Deletes a pipeline' do + detail 'This feature was introduced in GitLab 11.6' + http_codes [[204, 'Pipeline was deleted'], [403, 'Forbidden']] + end + params do + requires :pipeline_id, type: Integer, desc: 'The pipeline ID' + end + delete ':id/pipelines/:pipeline_id' do + authorize! :destroy_pipeline, pipeline + + destroy_conditionally!(pipeline) do + ::Ci::DestroyPipelineService.new(user_project, current_user).execute(pipeline) + end + end + desc 'Retry builds in the pipeline' do detail 'This feature was introduced in GitLab 8.11.' success Entities::Pipeline |