gitlab-org--gitlab-foss/app/serializers/pipeline_details_entity.rb
Grzegorz Bizon b9c19f6b0f Do not serialize a pipeline again when showing a build
This change makes it possible to avoid additional serialization of
entire pipeline when rendering a build details page. Instead we expose
more information from the build entity itself what is much cheaper than
serializing entire pipeline.

Additionally we do not need to serialize `latest?` flag, which involves
multiple Gitaly calls.
2019-05-24 10:04:04 +01:00

13 lines
325 B
Ruby

# frozen_string_literal: true
class PipelineDetailsEntity < PipelineEntity
expose :flags do
expose :latest?, as: :latest
end
expose :details do
expose :artifacts, using: BuildArtifactEntity
expose :manual_actions, using: BuildActionEntity
expose :scheduled_actions, using: BuildActionEntity
end
end