Commit 9b1038d5 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch 'add-labels-with-allow-list' into 'master'

Only add labels in the list from Danger

Closes gitlab-org/quality/triage-ops#560

See merge request gitlab-org/gitlab!41660
parents 7a9bd50d 7b228d9f
......@@ -14,8 +14,9 @@ SPECIALIZATIONS = {
}.freeze
labels_to_add = helper.changes_by_category.each_with_object([]) do |(category, _changes), memo|
label = SPECIALIZATIONS.fetch(category, category.to_s)
memo << label unless gitlab.mr_labels.include?(label)
label = SPECIALIZATIONS[category]
memo << label if label && !gitlab.mr_labels.include?(label)
end
if labels_to_add.any?
......
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