diff options
author | Shinya Maeda <gitlab.shinyamaeda@gmail.com> | 2017-05-17 00:20:11 +0900 |
---|---|---|
committer | Shinya Maeda <gitlab.shinyamaeda@gmail.com> | 2017-05-30 23:55:09 +0900 |
commit | 94f7595b9a8edcb4ac8480995a067eb4fa3dec7e (patch) | |
tree | b0f3819a95108a55feaa0a1c358022683a6bc432 /lib | |
parent | e929897873267b0815baf28dfa6b19d49d695554 (diff) | |
download | gitlab-ce-94f7595b9a8edcb4ac8480995a067eb4fa3dec7e.tar.gz |
Define last_pipeline in PipelineScheduleEntity
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/entities.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index b2bc0a17142..93f28e39f82 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -690,7 +690,9 @@ module API 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 + expose :last_pipeline, using: Entities::Pipeline do |pipeline_schedule| + pipeline_schedule.pipelines&.last + end expose :owner, using: Entities::UserBasic end |