gitlab-org--gitlab-foss/app/presenters/ci/pipeline_presenter.rb
2017-04-04 21:11:25 +03:00

13 lines
313 B
Ruby

module Ci
class PipelinePresenter < Gitlab::View::Presenter::Delegated
presents :pipeline
def auto_canceled?
canceled? && auto_canceled_by_id?
end
def status_title
"Pipeline is redundant and is auto-canceled by Pipeline ##{auto_canceled_by_id}" if auto_canceled?
end
end
end