diff options
author | Shinya Maeda <gitlab.shinyamaeda@gmail.com> | 2017-05-12 04:12:04 +0900 |
---|---|---|
committer | Shinya Maeda <gitlab.shinyamaeda@gmail.com> | 2017-05-30 23:55:08 +0900 |
commit | fbd3b3d8a245072121784df11b7b41d3257b989f (patch) | |
tree | 53fd84be85bd74545d59433b1b5fcf61f5d4910e /lib/api/entities.rb | |
parent | a16cbab3bb371941f51c3c4178b8b807de000ca8 (diff) | |
download | gitlab-ce-fbd3b3d8a245072121784df11b7b41d3257b989f.tar.gz |
Add API support for pipeline schedule
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r-- | lib/api/entities.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 8c5e5c91769..1f1942b2ec1 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -686,6 +686,14 @@ module API expose :coverage end + class PipelineSchedule < Grape::Entity + expose :id + expose :description, :ref, :cron, :cron_timezone, :next_run_at, :active + expose :created_at, :updated_at, :deleted_at + expose :last_pipeline, using: Entities::Pipeline, if: -> (pipeline_schedule, opts) { pipeline_schedule.last_pipeline.present? } + expose :owner, using: Entities::UserBasic + end + class EnvironmentBasic < Grape::Entity expose :id, :name, :slug, :external_url end |