diff --git a/spec/tooling/danger/project_helper_spec.rb b/spec/tooling/danger/project_helper_spec.rb index 00e528b0caf611e069c87b730d7437ad8b291878..2da90ddbd67851e9c474bedfd24924f3788dfabe 100644 --- a/spec/tooling/danger/project_helper_spec.rb +++ b/spec/tooling/danger/project_helper_spec.rb @@ -243,6 +243,7 @@ [:analytics_instrumentation] | '+data-track-action' | ['components/welcome.vue'] [:analytics_instrumentation] | '+ data: { track_label:' | ['admin/groups/_form.html.haml'] [:analytics_instrumentation] | '+ Gitlab::Tracking.event' | ['dashboard/todos_controller.rb', 'admin/groups/_form.html.haml'] + [:analytics_instrumentation] | '+ Gitlab::Tracking.event("c", "a")' | ['dashboard/todos_controller.rb', 'admin/groups/_form.html.haml'] [:database, :backend, :analytics_instrumentation] | '+ count(User.active)' | ['usage_data.rb', 'lib/gitlab/usage_data.rb', 'ee/lib/ee/gitlab/usage_data.rb'] [:database, :backend, :analytics_instrumentation] | '+ estimate_batch_distinct_count(User.active)' | ['usage_data.rb'] [:backend, :analytics_instrumentation] | '+ alt_usage_data(User.active)' | ['lib/gitlab/usage_data.rb'] diff --git a/tooling/danger/project_helper.rb b/tooling/danger/project_helper.rb index d0cea5516ac0412217f3a54769cf2de4ad13d1a1..2b781b58a6477f5d9b6ed93b335a3a3d47ca0b54 100644 --- a/tooling/danger/project_helper.rb +++ b/tooling/danger/project_helper.rb @@ -131,7 +131,7 @@ module ProjectHelper generator_templates/usage_metric_definition/metric_definition\.yml)\z}x => [:backend, :analytics_instrumentation], %r{gitlab/usage_data(_spec)?\.rb} => [:analytics_instrumentation], [%r{\.haml\z}, %r{data: \{ track}] => [:analytics_instrumentation], - [%r{\.(rb|haml)\z}, %r{Gitlab::Tracking\.(event|enabled\?|options)$}] => [:analytics_instrumentation], + [%r{\.(rb|haml)\z}, %r{Gitlab::Tracking\.(event|enabled\?|options)}] => [:analytics_instrumentation], [%r{\.(vue|js)\z}, %r{(Tracking.event|/\btrack\(/|data-track-action)}] => [:analytics_instrumentation], %r{\A((ee|jh)/)?app/(?!assets|views)[^/]+} => :backend,