diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-17 14:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-17 14:33:21 +0300 |
commit | 7021455bd1ed7b125c55eb1b33c5a01f2bc55ee0 (patch) | |
tree | 5bdc2229f5198d516781f8d24eace62fc7e589e9 /app/serializers/ci | |
parent | 185b095e93520f96e9cfc31d9c3e69b498cdab7c (diff) |
Add latest changes from gitlab-org/gitlab@15-6-stable-eev15.6.0-rc42
Diffstat (limited to 'app/serializers/ci')
-rw-r--r-- | app/serializers/ci/pipeline_entity.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/serializers/ci/pipeline_entity.rb b/app/serializers/ci/pipeline_entity.rb index 20aeb978520..143017c5159 100644 --- a/app/serializers/ci/pipeline_entity.rb +++ b/app/serializers/ci/pipeline_entity.rb @@ -4,12 +4,13 @@ class Ci::PipelineEntity < Grape::Entity include RequestAwareEntity include Gitlab::Utils::StrongMemoize - delegate :name, :failure_reason, :coverage, to: :presented_pipeline + delegate :event_type_name, :failure_reason, :coverage, to: :presented_pipeline expose :id expose :iid expose :user, using: UserEntity expose :active?, as: :active + expose :name, if: -> (pipeline, _) { Feature.enabled?(:pipeline_name, pipeline.project) } # Coverage isn't always necessary (e.g. when displaying project pipelines in # the UI). Instead of creating an entirely different entity we just allow the @@ -40,7 +41,8 @@ class Ci::PipelineEntity < Grape::Entity expose :stages, using: StageEntity expose :duration expose :finished_at - expose :name + expose :event_type_name + expose :event_type_name, as: :name # To be removed in 15.7 end expose :merge_request, if: -> (*) { has_presentable_merge_request? }, with: MergeRequestForPipelineEntity do |pipeline| |