summaryrefslogtreecommitdiff
path: root/lib/api/repositories.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-11-12 15:41:13 +0100
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-11-12 15:41:13 +0100
commita5ab56fd9191e23dfa60707fa42802342c1563f8 (patch)
treeb54ca2005609201b06af5acfda79e09087255ec7 /lib/api/repositories.rb
parent2ac1193720907bccc1f321e9c56fb5ca2b0a3a1c (diff)
downloadgitlab-ce-a5ab56fd9191e23dfa60707fa42802342c1563f8.tar.gz
Move git tags API to separate file
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'lib/api/repositories.rb')
-rw-r--r--lib/api/repositories.rb35
1 files changed, 0 insertions, 35 deletions
diff --git a/lib/api/repositories.rb b/lib/api/repositories.rb
index 20d568cf462..d7c48639eba 100644
--- a/lib/api/repositories.rb
+++ b/lib/api/repositories.rb
@@ -16,41 +16,6 @@ module API
end
end
- # Get a project repository tags
- #
- # Parameters:
- # id (required) - The ID of a project
- # Example Request:
- # GET /projects/:id/repository/tags
- get ":id/repository/tags" do
- present user_project.repo.tags.sort_by(&:name).reverse,
- with: Entities::RepoTag, project: user_project
- end
-
- # Create tag
- #
- # Parameters:
- # id (required) - The ID of a project
- # tag_name (required) - The name of the tag
- # ref (required) - Create tag from commit sha or branch
- # message (optional) - Specifying a message creates an annotated tag.
- # Example Request:
- # POST /projects/:id/repository/tags
- post ':id/repository/tags' do
- authorize_push_project
- message = params[:message] || nil
- result = CreateTagService.new(user_project, current_user).
- execute(params[:tag_name], params[:ref], message)
-
- if result[:status] == :success
- present result[:tag],
- with: Entities::RepoTag,
- project: user_project
- else
- render_api_error!(result[:message], 400)
- end
- end
-
# Get a project repository tree
#
# Parameters: