Danger asks for throughput labels
This commit is contained in:
parent
6ce54084bd
commit
4f72293aaf
1 changed files with 12 additions and 0 deletions
|
@ -1,5 +1,13 @@
|
||||||
# rubocop:disable Style/SignalException
|
# rubocop:disable Style/SignalException
|
||||||
|
|
||||||
|
THROUGHPUT_LABELS = [
|
||||||
|
'Community contribution',
|
||||||
|
'security',
|
||||||
|
'bug',
|
||||||
|
'feature',
|
||||||
|
'backstage'
|
||||||
|
].freeze
|
||||||
|
|
||||||
if gitlab.mr_body.size < 5
|
if gitlab.mr_body.size < 5
|
||||||
fail "Please provide a proper merge request description."
|
fail "Please provide a proper merge request description."
|
||||||
end
|
end
|
||||||
|
@ -8,6 +16,10 @@ if gitlab.mr_labels.empty?
|
||||||
fail "Please add labels to this merge request."
|
fail "Please add labels to this merge request."
|
||||||
end
|
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"]
|
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."
|
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
|
end
|
||||||
|
|
Loading…
Reference in a new issue