summaryrefslogtreecommitdiff
path: root/lib/gitlab/ci/status/build/failed_allowed.rb
blob: e42d3574357cb543c4b9caa346f98b318e3e70e3 (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
module Gitlab
  module Ci
    module Status
      module Build
        class FailedAllowed < Status::Extended
          def label
            'failed (allowed to fail)'
          end

          def icon
            'icon_status_warning'
          end

          def group
            'failed_with_warnings'
          end

          def self.matches?(build, user)
            build.failed? && build.allow_failure?
          end
        end
      end
    end
  end
end