2017-01-09 10:46:15 +00:00
|
|
|
module Gitlab
|
|
|
|
module Ci
|
|
|
|
module Status
|
|
|
|
##
|
2017-01-09 11:22:19 +00:00
|
|
|
# Extended status used when pipeline or stage passed conditionally.
|
2017-01-09 10:46:15 +00:00
|
|
|
# This means that failed jobs that are allowed to fail were present.
|
|
|
|
#
|
2017-05-05 13:21:06 +00:00
|
|
|
class SuccessWarning < Status::Extended
|
2017-01-09 10:46:15 +00:00
|
|
|
def text
|
|
|
|
'passed'
|
|
|
|
end
|
|
|
|
|
|
|
|
def label
|
|
|
|
'passed with warnings'
|
|
|
|
end
|
|
|
|
|
|
|
|
def icon
|
|
|
|
'icon_status_warning'
|
|
|
|
end
|
|
|
|
|
|
|
|
def group
|
|
|
|
'success_with_warnings'
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.matches?(subject, user)
|
2017-01-09 11:22:19 +00:00
|
|
|
subject.success? && subject.has_warnings?
|
2017-01-09 10:46:15 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|