summaryrefslogtreecommitdiff
path: root/app/models/ci/pipeline.rb
diff options
context:
space:
mode:
authorNathan Friend <nathan@gitlab.com>2019-03-21 15:31:09 +0000
committerFilipa Lacerda <filipa@gitlab.com>2019-03-21 15:31:09 +0000
commit7e6b57499f838245136e0657069f7559b1eba02f (patch)
tree79c320971de9ff6e4e17260035a04b6457413833 /app/models/ci/pipeline.rb
parent1e8cd7f9d9cbb53614f9ba5aee00e67e56a4851e (diff)
downloadgitlab-ce-7e6b57499f838245136e0657069f7559b1eba02f.tar.gz
Update merge request widget pipeline block
This commit updates the pipeline block that appears on the merge request page to include information that will be exposed by the API as part of the post-merge pipeline feature.
Diffstat (limited to 'app/models/ci/pipeline.rb')
-rw-r--r--app/models/ci/pipeline.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb
index ae74f569415..826b3f82bbf 100644
--- a/app/models/ci/pipeline.rb
+++ b/app/models/ci/pipeline.rb
@@ -746,6 +746,10 @@ module Ci
triggered_by_merge_request? && target_sha == merge_request.target_branch_sha
end
+ def matches_sha_or_source_sha?(sha)
+ self.sha == sha || self.source_sha == sha
+ end
+
private
def ci_yaml_from_repo