summaryrefslogtreecommitdiff
path: root/Dangerfile
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-06-18 11:18:50 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-06-18 11:18:50 +0000
commit8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch)
treea77e7fe7a93de11213032ed4ab1f33a3db51b738 /Dangerfile
parent00b35af3db1abfe813a778f643dad221aad51fca (diff)
downloadgitlab-ce-8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781.tar.gz
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'Dangerfile')
-rw-r--r--Dangerfile16
1 files changed, 12 insertions, 4 deletions
diff --git a/Dangerfile b/Dangerfile
index 7879c14b31e..cc6ebc27d4e 100644
--- a/Dangerfile
+++ b/Dangerfile
@@ -7,8 +7,16 @@ danger.import_plugin('danger/plugins/helper.rb')
danger.import_plugin('danger/plugins/roulette.rb')
danger.import_plugin('danger/plugins/changelog.rb')
-unless helper.release_automation?
- GitlabDanger.new(helper.gitlab_helper).rule_names.each do |file|
- danger.import_dangerfile(path: File.join('danger', file))
- end
+return if helper.release_automation?
+
+gitlab_danger = GitlabDanger.new(helper.gitlab_helper)
+
+gitlab_danger.rule_names.each do |file|
+ danger.import_dangerfile(path: File.join('danger', file))
+end
+
+anything_to_post = status_report.values.any? { |data| data.any? }
+
+if gitlab_danger.ci? && anything_to_post
+ markdown("**If needed, you can retry the [`danger-review` job](#{ENV['CI_JOB_URL']}) that generated this comment.**")
end