debian-mirror-gitlab/lib/api/entities/ci/pipeline_basic.rb

19 lines
527 B
Ruby
Raw Normal View History

2020-10-24 23:57:45 +05:30
# frozen_string_literal: true
module API
module Entities
module Ci
class PipelineBasic < Grape::Entity
2021-04-17 20:07:23 +05:30
expose :id, :project_id, :sha, :ref, :status
2020-10-24 23:57:45 +05:30
expose :created_at, :updated_at
2021-10-27 15:23:28 +05:30
expose :source, if: ->(pipeline, options) { ::Feature.enabled?(:pipeline_source_filter, options[:project], default_enabled: :yaml) }
2020-10-24 23:57:45 +05:30
expose :web_url do |pipeline, _options|
Gitlab::Routing.url_helpers.project_pipeline_url(pipeline.project, pipeline)
end
end
end
end
end