Commit 8172d5ca authored by Nemanja Boric's avatar Nemanja Boric

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.
parent 9bcc9ec1
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment