diff options
author | Nemanja Boric <4burgos@gmail.com> | 2016-02-10 23:52:39 +0100 |
---|---|---|
committer | Nemanja Boric <4burgos@gmail.com> | 2016-02-11 00:38:07 +0100 |
commit | 8172d5ca54f908d5ce9975dd18fb9bea0c992dbb (patch) | |
tree | f130fc28bd091f5ece847b9ce52b1acddfb8f786 | |
parent | 9bcc9ec14cf4f120b8e16d5c232f82e1fc5e2cfd (diff) | |
download | gitlab-ce-8172d5ca54f908d5ce9975dd18fb9bea0c992dbb.tar.gz |
Don't try to mark broken MR as mergable
In case merge request is broken, we shouldn't check if the sha
is mergable, as it will be null, and there's no point, as we know
that it's not mergable.
-rw-r--r-- | app/models/merge_request.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index 345b9a26d4e..1be8061e53d 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -241,7 +241,7 @@ class MergeRequest < ActiveRecord::Base return unless unchecked? can_be_merged = - project.repository.can_be_merged?(source_sha, target_branch) + !broken? && project.repository.can_be_merged?(source_sha, target_branch) if can_be_merged mark_as_mergeable |