2019-07-31 22:56:46 +05:30
|
|
|
# frozen_string_literal: true
|
2019-12-04 20:38:33 +05:30
|
|
|
|
2021-04-17 20:07:23 +05:30
|
|
|
require 'gitlab-dangerfiles'
|
2019-12-04 20:38:33 +05:30
|
|
|
|
2021-04-17 20:07:23 +05:30
|
|
|
Gitlab::Dangerfiles.import_plugins(danger)
|
|
|
|
danger.import_plugin('danger/plugins/*.rb')
|
2019-07-07 11:18:12 +05:30
|
|
|
|
2020-06-23 00:09:42 +05:30
|
|
|
return if helper.release_automation?
|
|
|
|
|
2021-04-17 20:07:23 +05:30
|
|
|
project_helper.rule_names.each do |rule|
|
|
|
|
danger.import_dangerfile(path: File.join('danger', rule))
|
2020-06-23 00:09:42 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
anything_to_post = status_report.values.any? { |data| data.any? }
|
|
|
|
|
2021-04-17 20:07:23 +05:30
|
|
|
if helper.ci? && anything_to_post
|
2020-06-23 00:09:42 +05:30
|
|
|
markdown("**If needed, you can retry the [`danger-review` job](#{ENV['CI_JOB_URL']}) that generated this comment.**")
|
2019-07-07 11:18:12 +05:30
|
|
|
end
|