Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Edge <asedge@gmail.com>2014-06-24 05:35:36 +0400
committerSean Edge <asedge@gmail.com>2014-09-04 17:47:20 +0400
commit468b2e8e0b46e7a7cee7cc9d9ce9b5c22e79c467 (patch)
treec19de65b8133c26a38a9813b9c6c5be412842e75 /lib/api/repositories.rb
parent487f78be129d44ae3dc098c9bd17925975435097 (diff)
Added annotated tags. Updated tag haml file and call to gitlab-shell. Updated API for annotated tags. Added tests for API. Strip leading/trailing whitespace from message, if present. Update CHANGELOG.
Diffstat (limited to 'lib/api/repositories.rb')
-rw-r--r--lib/api/repositories.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/api/repositories.rb b/lib/api/repositories.rb
index a3773d2c593..ce89177ef65 100644
--- a/lib/api/repositories.rb
+++ b/lib/api/repositories.rb
@@ -32,12 +32,15 @@ module API
# 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.execute(user_project, params[:tag_name],
- params[:ref], current_user)
+ params[:ref], message,
+ current_user)
if result[:status] == :success
present result[:tag],
with: Entities::RepoObject,