diff options
Diffstat (limited to 'danger/specialization_labels/Dangerfile')
-rw-r--r-- | danger/specialization_labels/Dangerfile | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/danger/specialization_labels/Dangerfile b/danger/specialization_labels/Dangerfile index b12771b9807..919f7313b49 100644 --- a/danger/specialization_labels/Dangerfile +++ b/danger/specialization_labels/Dangerfile @@ -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? |