Class: Gitlab::Ci::Status::Build::Action

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

Overview

Extended status for playable manual actions.

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)

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

def self.matches?(build, user)
  build.playable?
end

Instance Method Details

#labelObject


11
12
13
14
15
16
17
# File 'lib/gitlab/ci/status/build/action.rb', line 11

def label
  if has_action?
    @status.label
  else
    "#{@status.label} (not allowed)"
  end
end