Commit cfef583e authored by Rémy Coutable's avatar Rémy Coutable

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

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 0839fb0c
......@@ -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
......
......@@ -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' }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment