Class: Gitlab::Ci::Status::Build::FailedAllowed

Inherits:
Extended
  • Object
show all
Defined in:
lib/gitlab/ci/status/build/failed_allowed.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Extended

#initialize

Constructor Details

This class inherits a constructor from Gitlab::Ci::Status::Extended

Class Method Details

.matches?(build, user) ⇒ Boolean

Returns:

  • (Boolean)

24
25
26
# File 'lib/gitlab/ci/status/build/failed_allowed.rb', line 24

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

Instance Method Details

#groupObject


16
17
18
# File 'lib/gitlab/ci/status/build/failed_allowed.rb', line 16

def group
  'failed-with-warnings'
end

#iconObject


12
13
14
# File 'lib/gitlab/ci/status/build/failed_allowed.rb', line 12

def icon
  'status_warning'
end

#labelObject


8
9
10
# File 'lib/gitlab/ci/status/build/failed_allowed.rb', line 8

def label
  "failed #{allowed_to_fail_title}"
end

#status_tooltipObject


20
21
22
# File 'lib/gitlab/ci/status/build/failed_allowed.rb', line 20

def status_tooltip
  "#{@status.status_tooltip} #{allowed_to_fail_title}"
end