Skip to content
Snippets Groups Projects
Unverified Commit cfef583e authored by Rémy Coutable's avatar Rémy Coutable
Browse files

Detect the new stage labels in Gitlab::Danger::Teammate


Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 0839fb0c
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -39,9 +39,9 @@ module Gitlab
def has_capability?(project, category, kind, labels)
case category
when :test
area = role[/Test Automation Engineer(?:.*?, (\w+))/, 1]
area = role[/Test Automation Engineer(?:.*?, (\w+))/, 1].downcase
 
area && labels.any?(area) if kind == :reviewer
area && labels.any?("devops::#{area}") if kind == :reviewer
else
capabilities(project).include?("#{kind} #{category}")
end
Loading
Loading
Loading
Loading
@@ -28,7 +28,7 @@ describe Gitlab::Danger::Teammate do
end
 
context 'when labels contain Create and the category is test' do
let(:labels) { ['Create'] }
let(:labels) { ['devops::create'] }
 
context 'when role is Test Automation Engineer, Create' do
let(:role) { 'Test Automation Engineer, Create' }
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment