diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-11-28 13:13:32 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-11-29 16:12:49 +0300 |
commit | a49e9949c6bc474c8bfd4016d9c6c3b59776772f (patch) | |
tree | fd8efa2f374885a1c12c7eb0e2c0224de3727a24 /app/models/merge_request.rb | |
parent | b8f9949a70005978e83a3aaffbe0836c75d24b74 (diff) |
Rename `MergeRequest#pipeline` to `head_pipeline`
Diffstat (limited to 'app/models/merge_request.rb')
-rw-r--r-- | app/models/merge_request.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index 38d8c15e6b0..64990f8134e 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -678,7 +678,7 @@ class MergeRequest < ActiveRecord::Base def mergeable_ci_state? return true unless project.only_allow_merge_if_build_succeeds? - !pipeline || pipeline.success? || pipeline.skipped? + !head_pipeline || head_pipeline.success? || head_pipeline.skipped? end def environments @@ -774,10 +774,10 @@ class MergeRequest < ActiveRecord::Base commits.map(&:sha) end - def pipeline + def head_pipeline return unless diff_head_sha && source_project - @pipeline ||= source_project.pipeline_for(source_branch, diff_head_sha) + @head_pipeline ||= source_project.pipeline_for(source_branch, diff_head_sha) end def all_pipelines |