blob: 91f0ba1a58fabc452d47f078c6fb1e012a0abef5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
# 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
s_('CiStatusText|Warning')
end
def label
s_('CiStatusLabel|passed with warnings')
end
def icon
'status_warning'
end
def name
'SUCCESS_WITH_WARNINGS'
end
def group
'success-with-warnings'
end
def self.matches?(subject, user)
subject.success? && subject.has_warnings?
end
end
end
end
end
|