summaryrefslogtreecommitdiff
path: root/danger/metadata
diff options
context:
space:
mode:
authorMark Fletcher <mark@gitlab.com>2019-07-11 14:15:34 +0100
committerMark Fletcher <mark@gitlab.com>2019-07-11 14:19:26 +0100
commit4f72293aaf36de46a0bd1615e7a4b2da92414be8 (patch)
treecffcc5506888cf81951974f46948d8af4402873e /danger/metadata
parent6ce54084bd1426a7d5f49fa90d1186b4e3db7fbf (diff)
downloadgitlab-ce-4f72293aaf36de46a0bd1615e7a4b2da92414be8.tar.gz
Danger asks for throughput labelsdanger-throughputs
Diffstat (limited to 'danger/metadata')
-rw-r--r--danger/metadata/Dangerfile12
1 files changed, 12 insertions, 0 deletions
diff --git a/danger/metadata/Dangerfile b/danger/metadata/Dangerfile
index 1adca152736..f2d68e64eb6 100644
--- a/danger/metadata/Dangerfile
+++ b/danger/metadata/Dangerfile
@@ -1,5 +1,13 @@
# rubocop:disable Style/SignalException
+THROUGHPUT_LABELS = [
+ 'Community contribution',
+ 'security',
+ 'bug',
+ 'feature',
+ 'backstage'
+].freeze
+
if gitlab.mr_body.size < 5
fail "Please provide a proper merge request description."
end
@@ -8,6 +16,10 @@ if gitlab.mr_labels.empty?
fail "Please add labels to this merge request."
end
+if (THROUGHPUT_LABELS & gitlab.mr_labels).empty?
+ warn 'Please add a [throughput label](https://about.gitlab.com/handbook/engineering/management/throughput/#implementation) to this merge request.'
+end
+
unless gitlab.mr_json["assignee"]
warn "This merge request does not have any assignee yet. Setting an assignee clarifies who needs to take action on the merge request at any given time."
end