summaryrefslogtreecommitdiff
path: root/lib/api/branches.rb
diff options
context:
space:
mode:
author🙈 jacopo beschi 🙉 <intrip@gmail.com>2018-09-11 22:02:09 +0000
committerRobert Speicher <robert@gitlab.com>2018-09-11 22:02:09 +0000
commitf2747f1ce0e07c2b6f1d96ff104660575f835e67 (patch)
tree37bdbb9bfdd6734d54a704a81e06eb0d844537a2 /lib/api/branches.rb
parent099e404a2bbbf8b34c3e3bca29929828da36ecdb (diff)
downloadgitlab-ce-f2747f1ce0e07c2b6f1d96ff104660575f835e67.tar.gz
Resolve "500 Internal Server Error: Cherrypick commit with empty branch name"
Diffstat (limited to 'lib/api/branches.rb')
-rw-r--r--lib/api/branches.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/api/branches.rb b/lib/api/branches.rb
index 6c1d445e53d..ac33c2924ca 100644
--- a/lib/api/branches.rb
+++ b/lib/api/branches.rb
@@ -69,7 +69,7 @@ module API
success Entities::Branch
end
params do
- requires :branch, type: String, desc: 'The name of the branch'
+ requires :branch, type: String, desc: 'The name of the branch', allow_blank: false
optional :developers_can_push, type: Boolean, desc: 'Flag if developers can push to that branch'
optional :developers_can_merge, type: Boolean, desc: 'Flag if developers can merge to that branch'
end
@@ -106,7 +106,7 @@ module API
success Entities::Branch
end
params do
- requires :branch, type: String, desc: 'The name of the branch'
+ requires :branch, type: String, desc: 'The name of the branch', allow_blank: false
end
put ':id/repository/branches/:branch/unprotect', requirements: BRANCH_ENDPOINT_REQUIREMENTS do
authorize_admin_project
@@ -122,8 +122,8 @@ module API
success Entities::Branch
end
params do
- requires :branch, type: String, desc: 'The name of the branch'
- requires :ref, type: String, desc: 'Create branch from commit sha or existing branch'
+ requires :branch, type: String, desc: 'The name of the branch', allow_blank: false
+ requires :ref, type: String, desc: 'Create branch from commit sha or existing branch', allow_blank: false
end
post ':id/repository/branches' do
authorize_push_project
@@ -143,7 +143,7 @@ module API
desc 'Delete a branch'
params do
- requires :branch, type: String, desc: 'The name of the branch'
+ requires :branch, type: String, desc: 'The name of the branch', allow_blank: false
end
delete ':id/repository/branches/:branch', requirements: BRANCH_ENDPOINT_REQUIREMENTS do
authorize_push_project