From 9124f0b6015638ad08c0b643c29d927e1f76df62 Mon Sep 17 00:00:00 2001 From: Reuben Pereira Date: Tue, 18 Oct 2022 14:56:52 +0530 Subject: [PATCH] Display pipeline name on pipeline details and list pages The pipeline name is displayed instead of the commit title on the list page. If a pipeline does not have a name, the commit title is displayed. On the details page, the pipeline name is displayed as the header instead of the commit title. The commit title is moved to the row that currently only displays the commit SHA. --- .../pipelines_list/pipeline_url.vue | 16 ++++++- app/serializers/ci/pipeline_entity.rb | 1 + .../merge_requests/pipeline_entity.rb | 1 + app/serializers/pipeline_serializer.rb | 1 + app/views/projects/pipelines/_info.html.haml | 27 ++++++++---- ...ines#index-get_list_project_pipelines.json | 3 ++ .../projects/pipelines/pipeline_spec.rb | 43 ++++++++++++++++++- spec/frontend/pipelines/mock_data.js | 2 + spec/frontend/pipelines/pipeline_url_spec.js | 16 ++++++- spec/serializers/ci/pipeline_entity_spec.rb | 13 +++++- .../merge_requests/pipeline_entity_spec.rb | 14 +++++- spec/serializers/pipeline_serializer_spec.rb | 1 + 12 files changed, 122 insertions(+), 16 deletions(-) diff --git a/app/assets/javascripts/pipelines/components/pipelines_list/pipeline_url.vue b/app/assets/javascripts/pipelines/components/pipelines_list/pipeline_url.vue index 39d41415456277..fe2ef2c2d7138f 100644 --- a/app/assets/javascripts/pipelines/components/pipelines_list/pipeline_url.vue +++ b/app/assets/javascripts/pipelines/components/pipelines_list/pipeline_url.vue @@ -115,6 +115,9 @@ export default { commitTitle() { return this.pipeline?.commit?.title; }, + pipelineName() { + return this.pipeline?.name; + }, }, methods: { trackClick(action) { @@ -125,7 +128,18 @@ export default {