Commit 2503be2f authored by Lin Jen-Shin's avatar Lin Jen-Shin

Merge branch 'caalberts-roulette-ep-maintainer' into 'master'

Add engineering productivity maintainer to roulette capability

See merge request gitlab-org/gitlab!50356
parents 6b3c45b0 f9cf1264
...@@ -94,6 +94,7 @@ module Gitlab ...@@ -94,6 +94,7 @@ module Gitlab
when :engineering_productivity when :engineering_productivity
return false unless role[/Engineering Productivity/] return false unless role[/Engineering Productivity/]
return true if kind == :reviewer return true if kind == :reviewer
return true if capabilities(project).include?("#{kind} engineering_productivity")
capabilities(project).include?("#{kind} backend") capabilities(project).include?("#{kind} backend")
else else
......
...@@ -121,6 +121,14 @@ RSpec.describe Gitlab::Danger::Teammate do ...@@ -121,6 +121,14 @@ RSpec.describe Gitlab::Danger::Teammate do
end end
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 context 'when capabilities include trainee_maintainer backend' do
let(:capabilities) { ['trainee_maintainer backend'] } 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