2019-04-24 12:08:33 +00:00
|
|
|
# frozen_string_literal: true
|
2019-09-06 11:21:53 +00:00
|
|
|
|
|
|
|
require_relative 'lib/gitlab_danger'
|
2019-10-16 09:07:51 +00:00
|
|
|
require_relative 'lib/gitlab/danger/request_helper'
|
2019-09-06 11:21:53 +00:00
|
|
|
|
2018-10-16 13:56:03 +00:00
|
|
|
danger.import_plugin('danger/plugins/helper.rb')
|
2019-05-29 14:38:26 +00:00
|
|
|
danger.import_plugin('danger/plugins/roulette.rb')
|
2019-12-12 15:08:41 +00:00
|
|
|
danger.import_plugin('danger/plugins/changelog.rb')
|
2019-04-04 11:26:01 +00:00
|
|
|
|
2020-05-25 12:08:23 +00:00
|
|
|
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))
|
2019-04-04 11:26:01 +00:00
|
|
|
end
|
2020-05-25 12:08:23 +00:00
|
|
|
|
|
|
|
markdown("**If needed, you can retry the [`danger-review` job](#{ENV['CI_JOB_URL']}) that generated this comment.**") if gitlab_danger.ci?
|