diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-24 18:07:44 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-24 18:07:44 +0300 |
commit | ac9d41902b722212197aa134f1b309004ebe6c42 (patch) | |
tree | 52b1ebeb4f8832b7b2af9026b592c338af539bd6 /app/serializers | |
parent | c6373a2cec855c6543a1e035c52099e102dd05ef (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/pipeline_entity.rb | 2 | ||||
-rw-r--r-- | app/serializers/pipeline_serializer.rb | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/app/serializers/pipeline_entity.rb b/app/serializers/pipeline_entity.rb index cddb894fd64..6b2a1bfe666 100644 --- a/app/serializers/pipeline_entity.rb +++ b/app/serializers/pipeline_entity.rb @@ -78,7 +78,7 @@ class PipelineEntity < Grape::Entity end expose :failed_builds, if: -> (*) { can_retry? }, using: JobEntity do |pipeline| - pipeline.builds.failed + pipeline.failed_builds end private diff --git a/app/serializers/pipeline_serializer.rb b/app/serializers/pipeline_serializer.rb index fc3160e3c69..b25a1ea9209 100644 --- a/app/serializers/pipeline_serializer.rb +++ b/app/serializers/pipeline_serializer.rb @@ -40,7 +40,11 @@ class PipelineSerializer < BaseSerializer def preloaded_relations [ + :latest_statuses_ordered_by_stage, :stages, + { + failed_builds: %i(project metadata) + }, :retryable_builds, :cancelable_statuses, :trigger_requests, @@ -48,6 +52,7 @@ class PipelineSerializer < BaseSerializer :scheduled_actions, :artifacts, :merge_request, + :user, { pending_builds: :project, project: [:route, { namespace: :route }], |