diff options
author | James Fargher <jfargher@gitlab.com> | 2021-08-04 04:35:15 +0300 |
---|---|---|
committer | James Fargher <jfargher@gitlab.com> | 2021-08-11 21:18:31 +0300 |
commit | 0e73b69a8554f32ff3c002fab21a9e5b38eb564e (patch) | |
tree | 84db2985936ac880218dbc8cf0e975e8218c5d0a /Dangerfile | |
parent | 7953f740adfc114375713e56eb10df393ba39d54 (diff) |
Use gitlab-dangerfiles for assignee selection
Imports the Dangerfile code from GDK.
Diffstat (limited to 'Dangerfile')
-rw-r--r-- | Dangerfile | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/Dangerfile b/Dangerfile index 8289c7713..b71dc126f 100644 --- a/Dangerfile +++ b/Dangerfile @@ -1,3 +1,7 @@ +# frozen_string_literal: true + +require 'gitlab-dangerfiles' + GITALY_TEAM = %w[ 8bitlife avar @@ -9,10 +13,23 @@ GITALY_TEAM = %w[ zj-gitlab ] -danger.import_dangerfile(path: 'danger/assignees') +gitlab_dangerfiles = Gitlab::Dangerfiles::Engine.new(self) +gitlab_dangerfiles.import_plugins + +danger.import_plugin('danger/plugins/*.rb') + +gitlab_dangerfiles.import_dangerfiles + danger.import_dangerfile(path: 'danger/changelog') danger.import_dangerfile(path: 'danger/labels') danger.import_dangerfile(path: 'danger/merge_request') danger.import_dangerfile(path: 'danger/milestones') +danger.import_dangerfile(path: 'danger/roulette') + +anything_to_post = status_report.values.any?(&:any?) + +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 # vim: ft=ruby |