summaryrefslogtreecommitdiff
path: root/app/serializers
diff options
context:
space:
mode:
authorAlessio Caiazza <acaiazza@gitlab.com>2018-10-29 11:34:41 +0000
committerNick Thomas <nick@gitlab.com>2018-10-29 11:34:41 +0000
commitdadc046d3a5c797294330bcd26acdadac069c9cc (patch)
tree3468d1ca9b320315f3d4d5e5e032e6d547cc2550 /app/serializers
parent289651e26f5b18cc68dcdd052939cd878ca66092 (diff)
downloadgitlab-ce-dadc046d3a5c797294330bcd26acdadac069c9cc.tar.gz
post merge pipeline and environments status
Diffstat (limited to 'app/serializers')
-rw-r--r--app/serializers/environment_status_entity.rb1
-rw-r--r--app/serializers/merge_request_widget_entity.rb1
2 files changed, 2 insertions, 0 deletions
diff --git a/app/serializers/environment_status_entity.rb b/app/serializers/environment_status_entity.rb
index 3dfa4f204c9..f87cc894d2f 100644
--- a/app/serializers/environment_status_entity.rb
+++ b/app/serializers/environment_status_entity.rb
@@ -5,6 +5,7 @@ class EnvironmentStatusEntity < Grape::Entity
expose :id
expose :name
+ expose :status
expose :url do |es|
project_environment_path(es.project, es.environment)
diff --git a/app/serializers/merge_request_widget_entity.rb b/app/serializers/merge_request_widget_entity.rb
index 9ec24f799ef..f33a1654d5e 100644
--- a/app/serializers/merge_request_widget_entity.rb
+++ b/app/serializers/merge_request_widget_entity.rb
@@ -55,6 +55,7 @@ class MergeRequestWidgetEntity < IssuableEntity
expose :merge_commit_message
expose :actual_head_pipeline, with: PipelineDetailsEntity, as: :pipeline
+ expose :merge_pipeline, with: PipelineDetailsEntity, if: ->(mr, _) { mr.merged? && can?(request.current_user, :read_pipeline, mr.target_project)}
# Booleans
expose :merge_ongoing?, as: :merge_ongoing