diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2019-05-04 21:18:16 +0200 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2019-05-24 10:04:04 +0100 |
commit | 819746dc6544820f41d66b87c2c68efc9b17e0f4 (patch) | |
tree | 2f3647077b9e4d499a1ab3a89b8040b62984ea76 /app/serializers/build_details_entity.rb | |
parent | 79fc5e139c1dbfe0f80907bc319fea135f060279 (diff) | |
download | gitlab-ce-819746dc6544820f41d66b87c2c68efc9b17e0f4.tar.gz |
Do not serialize pipeline on each build serialization request
Diffstat (limited to 'app/serializers/build_details_entity.rb')
-rw-r--r-- | app/serializers/build_details_entity.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/serializers/build_details_entity.rb b/app/serializers/build_details_entity.rb index 62c26809eeb..2843132ef62 100644 --- a/app/serializers/build_details_entity.rb +++ b/app/serializers/build_details_entity.rb @@ -8,7 +8,11 @@ class BuildDetailsEntity < JobEntity expose :stuck?, as: :stuck expose :user, using: UserEntity expose :runner, using: RunnerEntity - expose :pipeline, using: PipelineEntity + + # expose :pipeline, using: PipelineEntity + expose :pipeline_path do |build| + project_pipeline_path(build.project, build.pipeline) + end expose :deployment_status, if: -> (*) { build.starts_environment? } do expose :deployment_status, as: :status |