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

          def text
            'passed'
          end

          def label
            'passed with warnings'
          end

          def icon
            'icon_status_warning'
          end

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