2019-04-24 08:08:33 -04:00
|
|
|
# frozen_string_literal: true
|
2019-09-06 07:21:53 -04:00
|
|
|
|
2021-03-12 07:09:33 -05:00
|
|
|
require 'gitlab-dangerfiles'
|
2019-09-06 07:21:53 -04:00
|
|
|
|
2021-12-03 10:10:36 -05:00
|
|
|
def ee?
|
|
|
|
# Support former project name for `dev` and support local Danger run
|
|
|
|
%w[gitlab gitlab-ee].include?(ENV['CI_PROJECT_NAME']) || Dir.exist?(File.expand_path('ee', __dir__))
|
|
|
|
end
|
2021-05-03 14:10:17 -04:00
|
|
|
|
2021-12-03 10:10:36 -05:00
|
|
|
project_name = ee? ? 'gitlab' : 'gitlab-foss'
|
2021-05-03 14:10:17 -04:00
|
|
|
|
2021-12-03 10:10:36 -05:00
|
|
|
Gitlab::Dangerfiles.for_project(self, project_name) do |gitlab_dangerfiles|
|
|
|
|
gitlab_dangerfiles.import_plugins
|
2022-03-23 20:07:27 -04:00
|
|
|
gitlab_dangerfiles.config.ci_only_rules = ProjectHelper::CI_ONLY_RULES
|
|
|
|
gitlab_dangerfiles.config.files_to_category = ProjectHelper::CATEGORIES
|
2021-05-05 08:10:33 -04:00
|
|
|
|
2022-03-23 20:07:27 -04:00
|
|
|
gitlab_dangerfiles.import_dangerfiles(except: %w[simple_roulette])
|
2019-04-04 07:26:01 -04:00
|
|
|
end
|