summaryrefslogtreecommitdiff
path: root/Dangerfile
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-03-16 18:18:33 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-03-16 18:18:33 +0000
commitf64a639bcfa1fc2bc89ca7db268f594306edfd7c (patch)
treea2c3c2ebcc3b45e596949db485d6ed18ffaacfa1 /Dangerfile
parentbfbc3e0d6583ea1a91f627528bedc3d65ba4b10f (diff)
downloadgitlab-ce-f64a639bcfa1fc2bc89ca7db268f594306edfd7c.tar.gz
Add latest changes from gitlab-org/gitlab@13-10-stable-eev13.10.0-rc40
Diffstat (limited to 'Dangerfile')
-rw-r--r--Dangerfile14
1 files changed, 6 insertions, 8 deletions
diff --git a/Dangerfile b/Dangerfile
index 34e0efa027a..699be613f2d 100644
--- a/Dangerfile
+++ b/Dangerfile
@@ -1,20 +1,18 @@
# frozen_string_literal: true
-require_relative 'tooling/gitlab_danger'
-require_relative 'tooling/danger/request_helper'
+require 'gitlab-dangerfiles'
-Dir["danger/plugins/*.rb"].sort.each { |f| danger.import_plugin(f) }
+Gitlab::Dangerfiles.import_plugins(danger)
+danger.import_plugin('danger/plugins/*.rb')
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))
+project_helper.rule_names.each do |rule|
+ danger.import_dangerfile(path: File.join('danger', rule))
end
anything_to_post = status_report.values.any? { |data| data.any? }
-if gitlab_danger.ci? && anything_to_post
+if helper.ci? && anything_to_post
markdown("**If needed, you can retry the [`danger-review` job](#{ENV['CI_JOB_URL']}) that generated this comment.**")
end