Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2019-04-02 10:07:11 +0300
committerShinya Maeda <shinya@gitlab.com>2019-04-02 11:55:06 +0300
commita04e1d5e32f7ae1740ba8b9daaf3f71a5048126c (patch)
treece9b5458a09928c9827c1bc7e89ec57f97451a52 /app/serializers/pipeline_entity.rb
parentba23d6377c650ecaac420c8085a2cd82737d3ced (diff)
Backport EE change
This is for merge request pipelines
Diffstat (limited to 'app/serializers/pipeline_entity.rb')
-rw-r--r--app/serializers/pipeline_entity.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/serializers/pipeline_entity.rb b/app/serializers/pipeline_entity.rb
index fba72410217..8fe5df81e6c 100644
--- a/app/serializers/pipeline_entity.rb
+++ b/app/serializers/pipeline_entity.rb
@@ -59,6 +59,8 @@ class PipelineEntity < Grape::Entity
end
expose :commit, using: CommitEntity
+ expose :source_sha, if: -> (pipeline, _) { pipeline.merge_request_pipeline? }
+ expose :target_sha, if: -> (pipeline, _) { pipeline.merge_request_pipeline? }
expose :yaml_errors, if: -> (pipeline, _) { pipeline.has_yaml_errors? }
expose :failure_reason, if: -> (pipeline, _) { pipeline.failure_reason? } do |pipeline|