Commit e236fbdb authored by Fabio Pitino's avatar Fabio Pitino

Use actual_head_pipeline to enforce presence

parent a26916d1
......@@ -1030,9 +1030,9 @@ class MergeRequest < ApplicationRecord
def mergeable_ci_state?
return true unless project.only_allow_merge_if_pipeline_succeeds?
return false 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)
......
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