diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-21 09:08:25 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-21 09:08:25 +0300 |
commit | 8f306a7dc503ae0fed4acebc528f2bc2030dad83 (patch) | |
tree | 80e62141eab6ff86ea7a184565afb32a650217d9 /app/serializers | |
parent | 76937b2add54d9ecfd1310847e244ac833d90e3b (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/ci/dag_job_entity.rb | 1 | ||||
-rw-r--r-- | app/serializers/ci/dag_pipeline_entity.rb | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/app/serializers/ci/dag_job_entity.rb b/app/serializers/ci/dag_job_entity.rb index b4947319ed1..ed4d4505152 100644 --- a/app/serializers/ci/dag_job_entity.rb +++ b/app/serializers/ci/dag_job_entity.rb @@ -3,6 +3,7 @@ module Ci class DagJobEntity < Grape::Entity expose :name + expose :scheduling_type expose :needs, if: -> (job, _) { job.scheduling_type_dag? } do |job| job.needs.pluck(:name) # rubocop: disable CodeReuse/ActiveRecord diff --git a/app/serializers/ci/dag_pipeline_entity.rb b/app/serializers/ci/dag_pipeline_entity.rb index b615dd2b194..51aa487ec29 100644 --- a/app/serializers/ci/dag_pipeline_entity.rb +++ b/app/serializers/ci/dag_pipeline_entity.rb @@ -2,12 +2,12 @@ module Ci class DagPipelineEntity < Grape::Entity - expose :ordered_stages_with_preloads, as: :stages, using: Ci::DagStageEntity + expose :stages_with_preloads, as: :stages, using: Ci::DagStageEntity private - def ordered_stages_with_preloads - object.ordered_stages.preload(preloaded_relations) # rubocop: disable CodeReuse/ActiveRecord + def stages_with_preloads + object.stages.preload(preloaded_relations) # rubocop: disable CodeReuse/ActiveRecord end def preloaded_relations |