diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-12 15:09:33 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-12 15:09:33 +0300 |
commit | 26e44c6225a19c3ec4e7d607f92b16d42b437c80 (patch) | |
tree | 03c97705ad836eb6a89df451c7f4216d6eb9779a /Dangerfile | |
parent | 3159925155a86dfd41000c1467576927c18c8f58 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'Dangerfile')
-rw-r--r-- | Dangerfile | 14 |
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 |