Api call to remove branch
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
0455391add
commit
a9d60b3b14
1 changed files with 12 additions and 0 deletions
|
@ -84,6 +84,18 @@ module API
|
||||||
|
|
||||||
present @branch, with: Entities::RepoObject, project: user_project
|
present @branch, with: Entities::RepoObject, project: user_project
|
||||||
end
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue