Commit f9cf1264 authored by Albert Salim's avatar Albert Salim

Add maintainer engineering_productivity to roulette

parent 15c1a003
......@@ -94,6 +94,7 @@ module Gitlab
when :engineering_productivity
return false unless role[/Engineering Productivity/]
return true if kind == :reviewer
return true if capabilities(project).include?("#{kind} engineering_productivity")
capabilities(project).include?("#{kind} backend")
else
......
......@@ -121,6 +121,14 @@ RSpec.describe Gitlab::Danger::Teammate do
end
end
context 'when capabilities include maintainer engineering productivity' do
let(:capabilities) { ['maintainer engineering_productivity'] }
it '#maintainer? returns true' do
expect(subject.maintainer?(project, :engineering_productivity, labels)).to be_truthy
end
end
context 'when capabilities include trainee_maintainer backend' do
let(:capabilities) { ['trainee_maintainer backend'] }
......
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