Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tooling/danger/project_helper.rb')
-rw-r--r--tooling/danger/project_helper.rb41
1 files changed, 39 insertions, 2 deletions
diff --git a/tooling/danger/project_helper.rb b/tooling/danger/project_helper.rb
index c552a75bba8..5d338393f90 100644
--- a/tooling/danger/project_helper.rb
+++ b/tooling/danger/project_helper.rb
@@ -22,12 +22,12 @@ module Tooling
ce_ee_vue_templates
ci_templates
datateam
- metadata
feature_flag
roulette
sidekiq_queues
specialization_labels
specs
+ z_metadata
].freeze
MESSAGE_PREFIX = '==>'
@@ -38,10 +38,34 @@ module Tooling
%r{\A((ee|jh)/)?config/feature_flags/} => :feature_flag,
+ %r{doc/api/usage_data.md} => [:product_intelligence],
+
%r{\Adoc/.*(\.(md|png|gif|jpg|yml))\z} => :docs,
%r{\A(CONTRIBUTING|LICENSE|MAINTENANCE|PHILOSOPHY|PROCESS|README)(\.md)?\z} => :docs,
%r{\Adata/whats_new/} => :docs,
+ %r{\A((ee|jh)/)?app/finders/(.+/)?integrations/} => [:integrations_be, :database, :backend],
+ [%r{\A((ee|jh)/)?db/(geo/)?(migrate|post_migrate)/}, %r{(:integrations|:\w+_tracker_data)\b}] => [:integrations_be, :database, :migration],
+ [%r{\A((ee|jh)/)?(app|lib)/.+\.rb}, %r{\b(Integrations::|\.execute_(integrations|hooks))\b}] => [:integrations_be, :backend],
+ %r{\A(
+ ((ee|jh)/)?app/((?!.*clusters)(?!.*alert_management)(?!.*views)(?!.*assets).+/)?integration.+ |
+ ((ee|jh)/)?app/((?!.*search).+/)?project_service.+ |
+ ((ee|jh)/)?app/(models|helpers|workers|services|controllers)/(.+/)?(jira_connect.+|.*hook.+) |
+ ((ee|jh)/)?app/controllers/(.+/)?oauth/jira/.+ |
+ ((ee|jh)/)?app/services/(.+/)?jira.+ |
+ ((ee|jh)/)?app/workers/(.+/)?(propagate_integration.+|irker_worker\.rb) |
+ ((ee|jh)/)?lib/(.+/)?(atlassian|data_builder|hook_data)/.+ |
+ ((ee|jh)/)?lib/(.+/)?.*integration.+ |
+ ((ee|jh)/)?lib/(.+/)?api/v3/github\.rb |
+ ((ee|jh)/)?lib/(.+/)?api/github/entities\.rb
+ )\z}x => [:integrations_be, :backend],
+
+ %r{\A(
+ ((ee|jh)/)?app/(views|assets)/((?!.*clusters)(?!.*alerts_settings).+/)?integration.+ |
+ ((ee|jh)/)?app/(views|assets)/(.+/)?jira_connect.+ |
+ ((ee|jh)/)?app/(views|assets)/((?!.*filtered_search).+/)?hooks?.+
+ )\z}x => [:integrations_fe, :frontend],
+
%r{\A(
app/assets/javascripts/tracking/.*\.js |
spec/frontend/tracking/.*\.js |
@@ -82,6 +106,7 @@ module Tooling
%r{\A((ee|jh)/)?app/finders/} => [:database, :backend],
%r{\Arubocop/cop/migration(/|\.rb)} => :database,
+ %r{\A(\.ruby-version\z|\.nvmrc\z|\.tool-versions\z)} => :tooling,
%r{\A(\.gitlab-ci\.yml\z|\.gitlab\/ci)} => :tooling,
%r{\A\.codeclimate\.yml\z} => :tooling,
%r{\Alefthook.yml\z} => :tooling,
@@ -100,6 +125,7 @@ module Tooling
%r{\A((ee|jh)/)?spec/support/shared_contexts/features/} => :test,
%r{\A((ee|jh)/)?spec/support/helpers/features/} => :test,
+ %r{\A((spec/)?lib/generators/gitlab/usage_metric_)} => [:product_intelligence],
%r{\A((ee|jh)/)?lib/gitlab/usage_data_counters/.*\.yml\z} => [:product_intelligence],
%r{\A((ee|jh)/)?config/metrics/((.*\.yml)|(schema\.json))\z} => [:product_intelligence],
%r{\A((ee|jh)/)?lib/gitlab/usage_data(_counters)?(/|\.rb)} => [:backend, :product_intelligence],
@@ -108,9 +134,16 @@ module Tooling
spec/lib/gitlab/tracking_spec\.rb |
app/helpers/tracking_helper\.rb |
spec/helpers/tracking_helper_spec\.rb |
+ (spec/)?lib/generators/gitlab/usage_metric_\S+ |
+ (spec/)?lib/generators/gitlab/usage_metric_definition/redis_hll_generator(_spec)?\.rb |
lib/generators/rails/usage_metric_definition_generator\.rb |
spec/lib/generators/usage_metric_definition_generator_spec\.rb |
generator_templates/usage_metric_definition/metric_definition\.yml)\z}x => [:backend, :product_intelligence],
+ %r{gitlab/usage_data(_spec)?\.rb} => [:product_intelligence],
+ [%r{\.haml\z}, %r{data: \{ track}] => [:product_intelligence],
+ [%r{\.(rb|haml)\z}, %r{Gitlab::Tracking\.(event|enabled\?|options)$}] => [:product_intelligence],
+ [%r{\.(vue|js)\z}, %r{(Tracking.event|/\btrack\(/|data-track-action)}] => [:product_intelligence],
+
%r{\A((ee|jh)/)?app/(?!assets|views)[^/]+} => :backend,
%r{\A((ee|jh)/)?(bin|config|generator_templates|lib|rubocop)/} => :backend,
%r{\A((ee|jh)/)?spec/migrations} => :database,
@@ -179,6 +212,10 @@ module Tooling
read_file(filename).lines(chomp: true)
end
+ def labels_to_add
+ @labels_to_add ||= []
+ end
+
private
def read_file(filename)
@@ -187,7 +224,7 @@ module Tooling
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__))
+ %w[gitlab gitlab-ee].include?(ENV['CI_PROJECT_NAME']) || Dir.exist?(File.expand_path('../../ee', __dir__))
end
end
end