debian-mirror-gitlab/app/serializers/pipeline_details_entity.rb
2020-06-23 00:09:42 +05:30

22 lines
625 B
Ruby

# frozen_string_literal: true
class PipelineDetailsEntity < PipelineEntity
expose :project, using: ProjectEntity
expose :flags do
expose :latest?, as: :latest
end
expose :details do
expose :artifacts do |pipeline, options|
rel = pipeline.downloadable_artifacts
BuildArtifactEntity.represent(rel, options)
end
expose :manual_actions, using: BuildActionEntity
expose :scheduled_actions, using: BuildActionEntity
end
expose :triggered_by_pipeline, as: :triggered_by, with: TriggeredPipelineEntity
expose :triggered_pipelines, as: :triggered, using: TriggeredPipelineEntity
end