Skip to content
Snippets Groups Projects
Commit 8f78ba55 authored by Felipe Artur's avatar Felipe Artur
Browse files

Improve MergeRequest#head_pipeline

parent fe673b49
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -146,11 +146,7 @@ class MergeRequest < ActiveRecord::Base
end
 
def head_pipeline
return unless head_pipeline_id
last_pipeline = Ci::Pipeline.find(head_pipeline_id)
last_pipeline.sha == diff_head_sha ? last_pipeline : nil
super&.sha == diff_head_sha ? super : nil
end
 
# Pattern used to extract `!123` merge request references from text
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment