Class: Gitlab::Dangerfiles::Capability::Test
- Inherits:
-
Gitlab::Dangerfiles::Capability
- Object
- Struct
- Gitlab::Dangerfiles::CapabilityStruct
- Gitlab::Dangerfiles::Capability
- Gitlab::Dangerfiles::Capability::Test
- Defined in:
- lib/gitlab/dangerfiles/capability.rb
Instance Attribute Summary
Attributes inherited from Gitlab::Dangerfiles::CapabilityStruct
#category, #kind, #labels, #project
Instance Method Summary collapse
Methods inherited from Gitlab::Dangerfiles::Capability
Instance Method Details
#has_capability?(teammate) ⇒ Boolean
42 43 44 45 46 47 48 |
# File 'lib/gitlab/dangerfiles/capability.rb', line 42 def has_capability?(teammate) return false if kind != :reviewer area = teammate.role[/Software Engineer in Test(?:.*?, (\w+))/, 1] !!area && labels.any?("devops::#{area.downcase}") end |