debian-mirror-gitlab/lib/gitlab/ci/status/build/failed_allowed.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
711 B
Ruby
Raw Normal View History

2018-12-13 13:39:08 +05:30
# frozen_string_literal: true
2017-08-17 22:00:37 +05:30
module Gitlab
module Ci
module Status
module Build
class FailedAllowed < Status::Extended
def label
2018-05-09 12:01:36 +05:30
"failed #{allowed_to_fail_title}"
2017-08-17 22:00:37 +05:30
end
def icon
2018-03-17 18:26:18 +05:30
'status_warning'
2017-08-17 22:00:37 +05:30
end
def group
2019-07-31 22:56:46 +05:30
'failed-with-warnings'
2017-08-17 22:00:37 +05:30
end
2018-05-09 12:01:36 +05:30
def status_tooltip
"#{@status.status_tooltip} #{allowed_to_fail_title}"
end
2017-08-17 22:00:37 +05:30
def self.matches?(build, user)
build.failed? && build.allow_failure?
end
2018-05-09 12:01:36 +05:30
private
def allowed_to_fail_title
"(allowed to fail)"
end
2017-08-17 22:00:37 +05:30
end
end
end
end
end