summaryrefslogtreecommitdiff
path: root/Dangerfile
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-10-27 18:13:16 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-10-27 18:13:16 +0000
commit4c5b7f992f2ee3134409559e35350748425fb467 (patch)
treeedabd5b6b177a0f982d27ecddd45de9dccbe6186 /Dangerfile
parentf50cb4f63fae6f02a0b8d9c3a95f29b3b4f79516 (diff)
downloadgitlab-ce-4c5b7f992f2ee3134409559e35350748425fb467.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'Dangerfile')
-rw-r--r--Dangerfile10
1 files changed, 9 insertions, 1 deletions
diff --git a/Dangerfile b/Dangerfile
index 37a45674e16..ab96c43c4e5 100644
--- a/Dangerfile
+++ b/Dangerfile
@@ -17,6 +17,14 @@ end
anything_to_post = status_report.values.any? { |data| data.any? }
-if helper.ci? && anything_to_post
+return unless helper.ci?
+
+if project_helper.labels_to_add.any?
+ gitlab.api.update_merge_request(gitlab.mr_json['project_id'],
+ gitlab.mr_json['iid'],
+ add_labels: project_helper.labels_to_add.join(','))
+end
+
+if anything_to_post
markdown("**If needed, you can retry the [`danger-review` job](#{ENV['CI_JOB_URL']}) that generated this comment.**")
end