summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-05-22 14:39:50 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-05-22 14:39:50 +0300
commita9d60b3b146acf5540b422919fa87fa931801062 (patch)
treed84b7a814b107d3150ee347cca0acabad64fa708 /lib
parent0455391add2032dddc7353d1b0ae36d591818d3f (diff)
downloadgitlab-ce-a9d60b3b146acf5540b422919fa87fa931801062.tar.gz
Api call to remove branch
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/api/branches.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/api/branches.rb b/lib/api/branches.rb
index d54f9371fbe..32597eb94c4 100644
--- a/lib/api/branches.rb
+++ b/lib/api/branches.rb
@@ -84,6 +84,18 @@ module API
present @branch, with: Entities::RepoObject, project: user_project
end
+
+ # Delete branch
+ #
+ # Parameters:
+ # id (required) - The ID of a project
+ # branch (required) - The name of the branch
+ # Example Request:
+ # DELETE /projects/:id/repository/branches/:branch
+ delete ":id/repository/branches/:branch" do
+ authorize_push_project
+ DeleteBranchService.new.execute(user_project, params[:branch], current_user)
+ end
end
end
end