gitlab-org--gitlab-foss/lib/gitlab/ci/status/success_warning.rb

34 lines
690 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module Gitlab
module Ci
module Status
##
# Extended status used when pipeline or stage passed conditionally.
# This means that failed jobs that are allowed to fail were present.
#
class SuccessWarning < Status::Extended
def text
2017-06-07 16:13:44 -04:00
s_('CiStatusText|passed')
end
def label
2017-06-07 16:13:44 -04:00
s_('CiStatusLabel|passed with warnings')
end
def icon
2017-10-02 04:40:32 -04:00
'status_warning'
end
def group
2019-04-12 08:39:10 -04:00
'success-with-warnings'
end
def self.matches?(subject, user)
subject.success? && subject.has_warnings?
end
end
end
end
end