debian-mirror-gitlab/lib/gitlab/ci/status/success_warning.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
690 B
Ruby
Raw Normal View History

2018-12-13 13:39:08 +05:30
# frozen_string_literal: true
2017-08-17 22:00:37 +05:30
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-09-10 17:25:29 +05:30
s_('CiStatusText|passed')
2017-08-17 22:00:37 +05:30
end
def label
2017-09-10 17:25:29 +05:30
s_('CiStatusLabel|passed with warnings')
2017-08-17 22:00:37 +05:30
end
def icon
2018-03-17 18:26:18 +05:30
'status_warning'
2017-08-17 22:00:37 +05:30
end
def group
2019-07-31 22:56:46 +05:30
'success-with-warnings'
2017-08-17 22:00:37 +05:30
end
def self.matches?(subject, user)
subject.success? && subject.has_warnings?
end
end
end
end
end