summaryrefslogtreecommitdiff
path: root/danger
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2019-05-24 02:07:59 +0800
committerLin Jen-Shin <godfat@godfat.org>2019-06-06 21:11:57 +0800
commit74399a90989e5caade1de1833a7f65cfbc070bcd (patch)
treebd47d825d52f32bdf33b11e9182e2f88eee58f02 /danger
parentdeb0c1dbb52493a0caf928844505b08c8b8b5c6c (diff)
downloadgitlab-ce-74399a90989e5caade1de1833a7f65cfbc070bcd.tar.gz
Show Test Automation Engineer for spec/feature as
reviewers.
Diffstat (limited to 'danger')
-rw-r--r--danger/roulette/Dangerfile10
1 files changed, 7 insertions, 3 deletions
diff --git a/danger/roulette/Dangerfile b/danger/roulette/Dangerfile
index de314c5b39f..a0f1447e76a 100644
--- a/danger/roulette/Dangerfile
+++ b/danger/roulette/Dangerfile
@@ -33,10 +33,14 @@ MARKDOWN
def spin_for_category(team, project, category, branch_name)
random = roulette.new_random(branch_name)
+ labels = gitlab.mr_labels
- reviewers = team.select { |member| member.reviewer?(project, category) }
- traintainers = team.select { |member| member.traintainer?(project, category) }
- maintainers = team.select { |member| member.maintainer?(project, category) }
+ reviewers, traintainers, maintainers =
+ %i[reviewer? traintainer? maintainer?].map do |kind|
+ team.select do |member|
+ member.public_send(kind, project, category, labels) # rubocop:disable GitlabSecurity/PublicSend
+ end
+ end
# TODO: take CODEOWNERS into account?
# https://gitlab.com/gitlab-org/gitlab-ce/issues/57653