summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorRui Anderson <anderson.rui@gmail.com>2016-04-27 15:34:42 -0300
committerRémy Coutable <remy@rymai.me>2016-06-10 14:36:54 +0200
commit07dbd6b3884c4f188b2c3f29dd7419791f1051eb (patch)
tree6c00e4b9097f62a89fcd6f506a9c7b3eb27231bc /lib/api
parentcfc99bbd1390bc548a703fdc7857c7db5b0e7c13 (diff)
downloadgitlab-ce-07dbd6b3884c4f188b2c3f29dd7419791f1051eb.tar.gz
Allow or not merge MR with failed build
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/merge_requests.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/merge_requests.rb b/lib/api/merge_requests.rb
index 43221d5622a..5822e19cd44 100644
--- a/lib/api/merge_requests.rb
+++ b/lib/api/merge_requests.rb
@@ -228,7 +228,7 @@ module API
# Merge request can not be merged
# because user dont have permissions to push into target branch
unauthorized! unless merge_request.can_be_merged_by?(current_user)
- not_allowed! if !merge_request.open? || merge_request.work_in_progress?
+ not_allowed! if !merge_request.open? || merge_request.work_in_progress? || merge_request.cannot_be_merged_because_build_failed?
merge_request.check_if_can_be_merged