Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorRobert Schilling <rschilling@student.tugraz.at>2018-08-21 11:56:34 +0300
committerRobert Schilling <rschilling@student.tugraz.at>2018-08-21 11:56:34 +0300
commitceaee58c491a4c027f0e81fae0ad345028e6795a (patch)
treebc57a4b9f32e022d53b6c6b9c8b2289b5a2fb4c2 /lib/api
parentcc9764acd049776a40b2188f72436b824f5b0d1a (diff)
API: Catch empty commit messages
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/files.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/files.rb b/lib/api/files.rb
index 29d7489bd7c..4b3280a98b4 100644
--- a/lib/api/files.rb
+++ b/lib/api/files.rb
@@ -59,7 +59,7 @@ module API
params :simple_file_params do
requires :file_path, type: String, desc: 'The url encoded path to the file. Ex. lib%2Fclass%2Erb'
requires :branch, type: String, desc: 'Name of the branch to commit into. To create a new branch, also provide `start_branch`.'
- requires :commit_message, type: String, desc: 'Commit message'
+ requires :commit_message, type: String, regexp: /^\S+$/, desc: 'Commit message'
optional :start_branch, type: String, desc: 'Name of the branch to start the new commit from'
optional :author_email, type: String, desc: 'The email of the author'
optional :author_name, type: String, desc: 'The name of the author'