2018-11-18 11:00:15 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2021-03-11 19:13:27 +05:30
|
|
|
class PipelineDetailsEntity < Ci::PipelineEntity
|
2020-03-13 15:44:24 +05:30
|
|
|
expose :project, using: ProjectEntity
|
|
|
|
|
2019-09-04 21:01:54 +05:30
|
|
|
expose :flags do
|
|
|
|
expose :latest?, as: :latest
|
|
|
|
end
|
|
|
|
|
2017-09-10 17:25:29 +05:30
|
|
|
expose :details do
|
2023-05-27 22:25:52 +05:30
|
|
|
expose :manual_actions, unless: proc { options[:disable_manual_and_scheduled_actions] }, using: BuildActionEntity
|
|
|
|
expose :scheduled_actions, unless: proc { options[:disable_manual_and_scheduled_actions] }, using: BuildActionEntity
|
|
|
|
expose :has_manual_actions do |pipeline|
|
|
|
|
pipeline.manual_actions.any?
|
|
|
|
end
|
|
|
|
expose :has_scheduled_actions do |pipeline|
|
|
|
|
pipeline.scheduled_actions.any?
|
|
|
|
end
|
2017-09-10 17:25:29 +05:30
|
|
|
end
|
2019-12-04 20:38:33 +05:30
|
|
|
|
2019-12-21 20:55:43 +05:30
|
|
|
expose :triggered_by_pipeline, as: :triggered_by, with: TriggeredPipelineEntity
|
|
|
|
expose :triggered_pipelines, as: :triggered, using: TriggeredPipelineEntity
|
|
|
|
end
|