summaryrefslogtreecommitdiff
path: root/Dangerfile
diff options
context:
space:
mode:
authorAsh McKenzie <amckenzie@gitlab.com>2019-09-06 11:21:53 +0000
committerLin Jen-Shin <godfat@godfat.org>2019-09-06 11:21:53 +0000
commit9fc9ab2ba2b0db05f6365054aa3bddcda3c7333d (patch)
treed59a451e3300c4598f2aa66d4b6e82b0b3fa56ef /Dangerfile
parent3441092b3840cecb913068542ee9242ea19a2017 (diff)
downloadgitlab-ce-9fc9ab2ba2b0db05f6365054aa3bddcda3c7333d.tar.gz
Add new GitlabDanger class
This class encapsulates our use of the Danger gem.
Diffstat (limited to 'Dangerfile')
-rw-r--r--Dangerfile23
1 files changed, 6 insertions, 17 deletions
diff --git a/Dangerfile b/Dangerfile
index 094d55e8652..228190cd530 100644
--- a/Dangerfile
+++ b/Dangerfile
@@ -1,23 +1,12 @@
# frozen_string_literal: true
+
+require_relative 'lib/gitlab_danger'
+
danger.import_plugin('danger/plugins/helper.rb')
danger.import_plugin('danger/plugins/roulette.rb')
unless helper.release_automation?
- danger.import_dangerfile(path: 'danger/metadata')
- danger.import_dangerfile(path: 'danger/changes_size')
- danger.import_dangerfile(path: 'danger/changelog')
- danger.import_dangerfile(path: 'danger/specs')
- danger.import_dangerfile(path: 'danger/gemfile')
- danger.import_dangerfile(path: 'danger/database')
- danger.import_dangerfile(path: 'danger/documentation')
- danger.import_dangerfile(path: 'danger/frozen_string')
- danger.import_dangerfile(path: 'danger/commit_messages')
- danger.import_dangerfile(path: 'danger/duplicate_yarn_dependencies')
- danger.import_dangerfile(path: 'danger/prettier')
- danger.import_dangerfile(path: 'danger/eslint')
- danger.import_dangerfile(path: 'danger/roulette')
- danger.import_dangerfile(path: 'danger/single_codebase')
- danger.import_dangerfile(path: 'danger/gitlab_ui_wg')
- danger.import_dangerfile(path: 'danger/ce_ee_vue_templates')
- danger.import_dangerfile(path: 'danger/only_documentation')
+ GitlabDanger.new(helper.gitlab_helper).rule_names.each do |file|
+ danger.import_dangerfile(path: File.join('danger', file))
+ end
end