diff options
author | Shinya Maeda <shinya@gitlab.com> | 2019-04-02 14:07:11 +0700 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2019-04-02 15:55:06 +0700 |
commit | a04e1d5e32f7ae1740ba8b9daaf3f71a5048126c (patch) | |
tree | ce9b5458a09928c9827c1bc7e89ec57f97451a52 /app/serializers/pipeline_entity.rb | |
parent | ba23d6377c650ecaac420c8085a2cd82737d3ced (diff) | |
download | gitlab-ce-a04e1d5e32f7ae1740ba8b9daaf3f71a5048126c.tar.gz |
Backport EE changeexpose-mr-pipeline-parameters-for-merge-widget-ce
This is for merge request pipelines
Diffstat (limited to 'app/serializers/pipeline_entity.rb')
-rw-r--r-- | app/serializers/pipeline_entity.rb | 2 |
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| |