2019-02-15 15:39:39 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Gitlab
|
|
|
|
module Ci
|
|
|
|
module Status
|
|
|
|
module Bridge
|
|
|
|
module Common
|
|
|
|
def label
|
|
|
|
subject.description
|
|
|
|
end
|
|
|
|
|
|
|
|
def has_details?
|
2020-11-24 15:15:51 +05:30
|
|
|
!!details_path
|
|
|
|
end
|
|
|
|
|
|
|
|
def details_path
|
|
|
|
return unless can?(user, :read_pipeline, downstream_pipeline)
|
|
|
|
|
2022-08-27 11:52:29 +05:30
|
|
|
project_pipeline_path(downstream_project, downstream_pipeline)
|
2019-02-15 15:39:39 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
def has_action?
|
|
|
|
false
|
|
|
|
end
|
|
|
|
|
2020-11-24 15:15:51 +05:30
|
|
|
private
|
|
|
|
|
|
|
|
def downstream_pipeline
|
|
|
|
subject.downstream_pipeline
|
|
|
|
end
|
|
|
|
|
|
|
|
def downstream_project
|
|
|
|
downstream_pipeline&.project
|
2019-02-15 15:39:39 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|