From 9c7602d104d5e4de110b01beda37fa470286f1dc Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Fri, 4 Aug 2017 19:25:35 +0200 Subject: Fix batch commit API --- lib/api/commits.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/api') diff --git a/lib/api/commits.rb b/lib/api/commits.rb index bc9f5d93ec1..a1cd8cc0058 100644 --- a/lib/api/commits.rb +++ b/lib/api/commits.rb @@ -63,7 +63,8 @@ module API post ":id/repository/commits" do authorize! :push_code, user_project - attrs[:branch_name] = declared_params.delete(:branch) + attrs = declared_params + attrs[:branch_name] = attrs.delete(:branch) attrs[:start_branch] ||= attrs[:branch_name] result = ::Files::MultiService.new(user_project, current_user, attrs).execute -- cgit v1.2.3