2019-07-31 22:56:46 +05:30
|
|
|
# frozen_string_literal: true
|
2019-12-04 20:38:33 +05:30
|
|
|
|
|
|
|
require_relative 'lib/gitlab_danger'
|
2019-12-21 20:55:43 +05:30
|
|
|
require_relative 'lib/gitlab/danger/request_helper'
|
2019-12-04 20:38:33 +05:30
|
|
|
|
2018-12-13 13:39:08 +05:30
|
|
|
danger.import_plugin('danger/plugins/helper.rb')
|
2019-09-04 21:01:54 +05:30
|
|
|
danger.import_plugin('danger/plugins/roulette.rb')
|
2020-01-01 13:55:28 +05:30
|
|
|
danger.import_plugin('danger/plugins/changelog.rb')
|
2019-07-07 11:18:12 +05:30
|
|
|
|
2020-06-23 00:09:42 +05:30
|
|
|
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.**")
|
2019-07-07 11:18:12 +05:30
|
|
|
end
|