Commit a9d60b3b146acf5540b422919fa87fa931801062
1 parent
0455391a
Exists in
spb-stable
and in
2 other branches
Api call to remove branch
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
1 changed file
with
12 additions
and
0 deletions
Show diff stats
lib/api/branches.rb
... | ... | @@ -84,6 +84,18 @@ module API |
84 | 84 | |
85 | 85 | present @branch, with: Entities::RepoObject, project: user_project |
86 | 86 | end |
87 | + | |
88 | + # Delete branch | |
89 | + # | |
90 | + # Parameters: | |
91 | + # id (required) - The ID of a project | |
92 | + # branch (required) - The name of the branch | |
93 | + # Example Request: | |
94 | + # DELETE /projects/:id/repository/branches/:branch | |
95 | + delete ":id/repository/branches/:branch" do | |
96 | + authorize_push_project | |
97 | + DeleteBranchService.new.execute(user_project, params[:branch], current_user) | |
98 | + end | |
87 | 99 | end |
88 | 100 | end |
89 | 101 | end | ... | ... |