2016-11-10 14:32:23 +00:00
|
|
|
class PipelineStageEntity < Grape::Entity
|
|
|
|
include RequestAwareEntity
|
|
|
|
|
2016-12-09 20:56:12 +00:00
|
|
|
expose :name
|
|
|
|
expose :detailed_status, as: :status, using: StatusEntity
|
2016-11-10 14:32:23 +00:00
|
|
|
|
2016-12-09 20:56:12 +00:00
|
|
|
expose :path do |stage|
|
2016-11-10 14:32:23 +00:00
|
|
|
namespace_project_pipeline_path(
|
|
|
|
stage.pipeline.project.namespace,
|
|
|
|
stage.pipeline.project,
|
|
|
|
stage.pipeline.id,
|
|
|
|
anchor: stage.name)
|
|
|
|
end
|
|
|
|
end
|