Commit 616b8ea0 authored by Kamil Trzciński's avatar Kamil Trzciński

Fix `downstream_pipeline` of `Ci::Bridge`

parent f98e9028
...@@ -81,10 +81,6 @@ module Ci ...@@ -81,10 +81,6 @@ module Ci
sourced_pipelines.exists? sourced_pipelines.exists?
end end
def first_downstream_pipeline
sourced_pipelines.first
end
def downstream_pipeline_params def downstream_pipeline_params
return child_params if triggers_child_pipeline? return child_params if triggers_child_pipeline?
return cross_project_params if downstream_project.present? return cross_project_params if downstream_project.present?
......
--- ---
title: Make bridge/child pipelines clickable title: Make bridge/child pipelines clickable
merge_request: merge_request: 41263
author: author:
type: added type: added
...@@ -10,13 +10,13 @@ module Gitlab ...@@ -10,13 +10,13 @@ module Gitlab
end end
def has_details? def has_details?
can?(user, :read_pipeline, subject.first_downstream_pipeline) can?(user, :read_pipeline, subject.downstream_pipeline)
end end
def details_path def details_path
return unless subject.first_downstream_pipeline return unless subject.downstream_pipeline
pipeline = subject.first_downstream_pipeline pipeline = subject.downstream_pipeline
project_pipeline_path(pipeline.project, pipeline) project_pipeline_path(pipeline.project, pipeline)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment