summaryrefslogtreecommitdiff
path: root/lib/api/tags.rb
diff options
context:
space:
mode:
authorRobert Schilling <rschilling@student.tugraz.at>2016-01-08 10:10:04 +0100
committerRobert Schilling <rschilling@student.tugraz.at>2016-01-08 10:10:04 +0100
commit4c90ed52fe6ff7b1155088c46460c411e121feb3 (patch)
treec37c4109b8086f0848703d39efeffcbaff0b6ac1 /lib/api/tags.rb
parente78ddb09733beced9d4d34e8f68966f18210bef7 (diff)
downloadgitlab-ce-4c90ed52fe6ff7b1155088c46460c411e121feb3.tar.gz
Delete tag via APIapi-delete-tag
Diffstat (limited to 'lib/api/tags.rb')
-rw-r--r--lib/api/tags.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/api/tags.rb b/lib/api/tags.rb
index 47621f443e6..2d8a9e51bb9 100644
--- a/lib/api/tags.rb
+++ b/lib/api/tags.rb
@@ -40,6 +40,27 @@ module API
end
end
+ # Delete tag
+ #
+ # Parameters:
+ # id (required) - The ID of a project
+ # tag_name (required) - The name of the tag
+ # Example Request:
+ # DELETE /projects/:id/repository/tags/:tag
+ delete ":id/repository/tags/:tag_name", requirements: { tag_name: /.*/ } do
+ authorize_push_project
+ result = DeleteTagService.new(user_project, current_user).
+ execute(params[:tag_name])
+
+ if result[:status] == :success
+ {
+ tag_name: params[:tag_name]
+ }
+ else
+ render_api_error!(result[:message], result[:return_code])
+ end
+ end
+
# Add release notes to tag
#
# Parameters: