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