Commit f48a6338 authored by Rémy Coutable's avatar Rémy Coutable

Update gitlab-dangerfiles to fix an issue with labels added by Danger

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent e4c6d370
......@@ -398,7 +398,7 @@ group :development, :test do
end
group :development, :test, :danger do
gem 'gitlab-dangerfiles', '~> 2.10.1', require: false
gem 'gitlab-dangerfiles', '~> 2.10.2', require: false
end
group :development, :test, :coverage do
......
......@@ -463,7 +463,7 @@ GEM
terminal-table (~> 1.5, >= 1.5.1)
gitlab-chronic (0.10.5)
numerizer (~> 0.2)
gitlab-dangerfiles (2.10.1)
gitlab-dangerfiles (2.10.2)
danger (>= 8.3.1)
danger-gitlab (>= 8.0.0)
gitlab-experiment (0.7.0)
......@@ -1478,7 +1478,7 @@ DEPENDENCIES
gitaly (~> 14.8.0.pre.rc1)
github-markup (~> 1.7.0)
gitlab-chronic (~> 0.10.5)
gitlab-dangerfiles (~> 2.10.1)
gitlab-dangerfiles (~> 2.10.2)
gitlab-experiment (~> 0.7.0)
gitlab-fog-azure-rm (~> 1.2.0)
gitlab-labkit (~> 0.22.0)
......
......@@ -19,4 +19,4 @@ return if product_intelligence_paths_to_review.empty? || product_intelligence.sk
warn format(CHANGED_FILES_MESSAGE, changed_files: helper.markdown_list(product_intelligence_paths_to_review)) unless product_intelligence.has_approved_label?
helper.labels_to_add.merge(labels_to_add) unless labels_to_add.empty?
helper.labels_to_add.concat(labels_to_add) unless labels_to_add.empty?
......@@ -26,4 +26,4 @@ labels_to_add = helper.changes_by_category.each_with_object([]) do |(category, _
memo << label
end
helper.labels_to_add.merge(labels_to_add) if labels_to_add.any?
helper.labels_to_add.concat(labels_to_add) if labels_to_add.any?
......@@ -124,8 +124,8 @@ NOTE:
This is applicable to all the projects that use the [`gitlab-dangerfiles` gem](https://rubygems.org/gems/gitlab-dangerfiles).
Danger is often used to improve MR hygiene by adding labels. Instead of calling the
API directly in your `Dangerfile`, add the labels to `helper.labels_to_add` set (with `helper.labels_to_add << label`
or `helper.labels_to_add.merge(array_of_labels)`.
API directly in your `Dangerfile`, add the labels to `helper.labels_to_add` array (with `helper.labels_to_add << label`
or `helper.labels_to_add.concat(array_of_labels)`.
`gitlab-dangerfiles` will then take care of adding the labels to the MR with a single API call after all the rules
have had the chance to add to `helper.labels_to_add`.
......
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