summaryrefslogtreecommitdiff
path: root/lib/gitlab/ci/status/pipeline/success_with_warnings.rb
blob: 4b040d60df83320a8e427b04e4736e16cba38821 (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
module Gitlab
  module Ci
    module Status
      module Pipeline
        class SuccessWithWarnings < SimpleDelegator
          extend Status::Extended

          def text
            'passed'
          end

          def label
            'passed with warnings'
          end

          def icon
            'icon_status_warning'
          end

          def to_s
            'success_with_warnings'
          end

          def self.matches?(pipeline)
            pipeline.success? && pipeline.has_warnings?
          end
        end
      end
    end
  end
end