debian-mirror-gitlab/lib/api/entities/ci/pipeline_schedule_details.rb
2020-11-05 12:06:23 +05:30

14 lines
423 B
Ruby

# frozen_string_literal: true
module API
module Entities
module Ci
class PipelineScheduleDetails < PipelineSchedule
expose :last_pipeline, using: ::API::Entities::Ci::PipelineBasic
expose :variables,
using: ::API::Entities::Ci::Variable,
if: ->(schedule, options) { Ability.allowed?(options[:user], :read_pipeline_schedule_variables, schedule) }
end
end
end
end