diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2019-06-25 15:48:39 +0000 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2019-06-25 15:48:39 +0000 |
commit | d73b6d0f455c4b77dbea7e8b5d5a1574fd665fe0 (patch) | |
tree | 949e8a202403d706fa179f32e824befd46d145ab /app | |
parent | c499c08e516cec7299a475529a5199608722c295 (diff) | |
parent | e236fbdb25ee710566d455851238b5ed85b894d7 (diff) | |
download | gitlab-ce-d73b6d0f455c4b77dbea7e8b5d5a1574fd665fe0.tar.gz |
Merge branch 'require-pipeline-when-enabling-only-allow-merge-if-pipeline-succeeds' into 'master'
Pipeline must be present if "Pipeline must succeed" is set
See merge request gitlab-org/gitlab-ce!29926
Diffstat (limited to 'app')
-rw-r--r-- | app/models/merge_request.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index df2dc9c49eb..82034f5946b 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -1030,9 +1030,9 @@ class MergeRequest < ApplicationRecord def mergeable_ci_state? return true unless project.only_allow_merge_if_pipeline_succeeds? - return true unless head_pipeline + return false unless actual_head_pipeline - actual_head_pipeline&.success? || actual_head_pipeline&.skipped? + actual_head_pipeline.success? || actual_head_pipeline.skipped? end def environments_for(current_user) |