Class: Gitlab::Ci::Status::SuccessWarning

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

Overview

Extended status used when pipeline or stage passed conditionally. This means that failed jobs that are allowed to fail were present.

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?(subject, user) ⇒ Boolean

Returns:

  • (Boolean)

27
28
29
# File 'lib/gitlab/ci/status/success_warning.rb', line 27

def self.matches?(subject, user)
  subject.success? && subject.has_warnings?
end

Instance Method Details

#groupObject


23
24
25
# File 'lib/gitlab/ci/status/success_warning.rb', line 23

def group
  'success-with-warnings'
end

#iconObject


19
20
21
# File 'lib/gitlab/ci/status/success_warning.rb', line 19

def icon
  'status_warning'
end

#labelObject


15
16
17
# File 'lib/gitlab/ci/status/success_warning.rb', line 15

def label
  s_('CiStatusLabel|passed with warnings')
end

#textObject


11
12
13
# File 'lib/gitlab/ci/status/success_warning.rb', line 11

def text
  s_('CiStatusText|passed')
end