Commit eb2339a4 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge pull request #9023 from dantudor/patch-1

Allow ability to delete branches with '/` in name
parents 0191857f a6c63356
require 'mime/types'
require 'uri'
module API
# Projects API
......@@ -101,10 +100,11 @@ module API
# branch (required) - The name of the branch
# Example Request:
# DELETE /projects/:id/repository/branches/:branch
delete ":id/repository/branches/:branch" do
delete ":id/repository/branches/:branch",
requirements: { branch: /.*/ } do
authorize_push_project
result = DeleteBranchService.new(user_project, current_user).
execute(URI.unescape(params[:branch]))
execute(params[:branch])
if result[:status] == :success
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment