Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-04-27 18:09:52 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-04-27 18:09:52 +0300
commita2f36202361dcef1f2c9242929f81a4090b9ce97 (patch)
treeba21b187bf565cde47412e89bb1ccde829672dd9 /danger/product_intelligence
parent154523302b10ab5aeb67bde861880a98e3f8117a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'danger/product_intelligence')
-rw-r--r--danger/product_intelligence/Dangerfile13
1 files changed, 9 insertions, 4 deletions
diff --git a/danger/product_intelligence/Dangerfile b/danger/product_intelligence/Dangerfile
index d2bed7629ff..8019fad57db 100644
--- a/danger/product_intelligence/Dangerfile
+++ b/danger/product_intelligence/Dangerfile
@@ -86,8 +86,13 @@ if matching_changed_files.any?
fail format(UPDATE_DICTIONARY_MESSAGE) if required_dictionary_update_changed_files.any? && dictionary_changed_file.empty?
- labels = ['product intelligence']
- labels << 'product intelligence::review pending' unless helper.mr_has_labels?('product intelligence::approved')
-
- markdown(helper.prepare_labels_for_mr(labels))
+ labels = []
+ labels << 'product intelligence' unless helper.mr_has_labels?('product intelligence')
+ labels << 'product intelligence::review pending' unless helper.mr_has_labels?(['product intelligence::approved', 'product intelligence::review pending'])
+
+ if labels.any?
+ gitlab.api.update_merge_request(gitlab.mr_json['project_id'],
+ gitlab.mr_json['iid'],
+ add_labels: helper.prepare_labels_for_mr(labels))
+ end
end