summaryrefslogtreecommitdiff
path: root/lib/api/commits.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/commits.rb
parent099e404a2bbbf8b34c3e3bca29929828da36ecdb (diff)
downloadgitlab-ce-f2747f1ce0e07c2b6f1d96ff104660575f835e67.tar.gz
Resolve "500 Internal Server Error: Cherrypick commit with empty branch name"
Diffstat (limited to 'lib/api/commits.rb')
-rw-r--r--lib/api/commits.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/commits.rb b/lib/api/commits.rb
index 3e8de3c8dae..f86ac60b54b 100644
--- a/lib/api/commits.rb
+++ b/lib/api/commits.rb
@@ -71,7 +71,7 @@ module API
detail 'This feature was introduced in GitLab 8.13'
end
params do
- requires :branch, type: String, desc: 'Name of the branch to commit into. To create a new branch, also provide `start_branch`.'
+ requires :branch, type: String, desc: 'Name of the branch to commit into. To create a new branch, also provide `start_branch`.', allow_blank: false
requires :commit_message, type: String, desc: 'Commit message'
requires :actions, type: Array[Hash], desc: 'Actions to perform in commit'
optional :start_branch, type: String, desc: 'Name of the branch to start the new commit from'
@@ -151,7 +151,7 @@ module API
end
params do
requires :sha, type: String, desc: 'A commit sha, or the name of a branch or tag to be cherry picked'
- requires :branch, type: String, desc: 'The name of the branch'
+ requires :branch, type: String, desc: 'The name of the branch', allow_blank: false
end
post ':id/repository/commits/:sha/cherry_pick', requirements: API::COMMIT_ENDPOINT_REQUIREMENTS do
authorize_push_to_branch!(params[:branch])