Commit d8364dd7 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch '343486-integrations-roulette-reviews' into 'master'

Add Integrations reviews to Roulette

See merge request gitlab-org/gitlab!74330
parents a412071a d58efcd6
......@@ -48,10 +48,18 @@ Please consider creating a merge request to
for them.
MARKDOWN
def group_not_available_template(slack_channel, gitlab_group)
<<~TEMPLATE
No engineer is available for automated assignment, please reach out to `#{slack_channel}` slack channel or mention `#{gitlab_group}` for assistance.
TEMPLATE
end
OPTIONAL_REVIEW_TEMPLATE = '%{role} review is optional for %{category}'
NOT_AVAILABLE_TEMPLATES = {
default: 'No %{role} available',
product_intelligence: "No engineer is available for automated assignment, please reach out to `#g_product_intelligence` slack channel or mention `@gitlab-org/growth/product-intelligence/engineers` for assistance."
product_intelligence: group_not_available_template('#g_product_intelligence', '@gitlab-org/growth/product-intelligence/engineers'),
integrations_be: group_not_available_template('#g_ecosystem_integrations', '@gitlab-org/ecosystem-stage/integrations'),
integrations_fe: group_not_available_template('#g_ecosystem_integrations', '@gitlab-org/ecosystem-stage/integrations')
}.freeze
def note_for_spins_role(spins, role, category)
......
......@@ -193,6 +193,54 @@ RSpec.describe Tooling::Danger::ProjectHelper do
'config/metrics/schema.json' | [:product_intelligence]
'doc/api/usage_data.md' | [:product_intelligence]
'spec/lib/gitlab/usage_data_spec.rb' | [:product_intelligence]
'app/models/integration.rb' | [:integrations_be, :backend]
'ee/app/models/integrations/github.rb' | [:integrations_be, :backend]
'ee/app/models/ee/integrations/jira.rb' | [:integrations_be, :backend]
'app/models/integrations/chat_message/pipeline_message.rb' | [:integrations_be, :backend]
'app/models/jira_connect_subscription.rb' | [:integrations_be, :backend]
'app/models/hooks/service_hook.rb' | [:integrations_be, :backend]
'ee/app/models/ee/hooks/system_hook.rb' | [:integrations_be, :backend]
'app/services/concerns/integrations/project_test_data.rb' | [:integrations_be, :backend]
'ee/app/services/ee/integrations/test/project_service.rb' | [:integrations_be, :backend]
'app/controllers/concerns/integrations/actions.rb' | [:integrations_be, :backend]
'ee/app/controllers/concerns/ee/integrations/params.rb' | [:integrations_be, :backend]
'ee/app/controllers/projects/integrations/jira/issues_controller.rb' | [:integrations_be, :backend]
'app/controllers/projects/hooks_controller.rb' | [:integrations_be, :backend]
'app/controllers/admin/hook_logs_controller.rb' | [:integrations_be, :backend]
'app/controllers/groups/settings/integrations_controller.rb' | [:integrations_be, :backend]
'app/controllers/jira_connect/branches_controller.rb' | [:integrations_be, :backend]
'app/controllers/oauth/jira/authorizations_controller.rb' | [:integrations_be, :backend]
'ee/app/finders/projects/integrations/jira/by_ids_finder.rb' | [:integrations_be, :database, :backend]
'app/workers/jira_connect/sync_merge_request_worker.rb' | [:integrations_be, :backend]
'app/workers/propagate_integration_inherit_worker.rb' | [:integrations_be, :backend]
'app/workers/web_hooks/log_execution_worker.rb' | [:integrations_be, :backend]
'app/workers/web_hook_worker.rb' | [:integrations_be, :backend]
'app/workers/project_service_worker.rb' | [:integrations_be, :backend]
'lib/atlassian/jira_connect/serializers/commit_entity.rb' | [:integrations_be, :backend]
'lib/api/entities/project_integration.rb' | [:integrations_be, :backend]
'lib/gitlab/hook_data/note_builder.rb' | [:integrations_be, :backend]
'lib/gitlab/data_builder/note.rb' | [:integrations_be, :backend]
'ee/lib/ee/gitlab/integrations/sti_type.rb' | [:integrations_be, :backend]
'ee/lib/ee/api/helpers/integrations_helpers.rb' | [:integrations_be, :backend]
'ee/app/serializers/integrations/jira_serializers/issue_entity.rb' | [:integrations_be, :backend]
'lib/api/github/entities.rb' | [:integrations_be, :backend]
'lib/api/v3/github.rb' | [:integrations_be, :backend]
'app/models/clusters/integrations/elastic_stack.rb' | [:backend]
'app/controllers/clusters/integrations_controller.rb' | [:backend]
'app/services/clusters/integrations/prometheus_health_check_service.rb' | [:backend]
'app/graphql/types/alert_management/integration_type.rb' | [:backend]
'app/views/jira_connect/branches/new.html.haml' | [:integrations_fe, :frontend]
'app/views/layouts/jira_connect.html.haml' | [:integrations_fe, :frontend]
'app/assets/javascripts/jira_connect/branches/pages/index.vue' | [:integrations_fe, :frontend]
'ee/app/views/projects/integrations/jira/issues/show.html.haml' | [:integrations_fe, :frontend]
'ee/app/assets/javascripts/integrations/zentao/issues_list/graphql/queries/get_zentao_issues.query.graphql' | [:integrations_fe, :frontend]
'app/assets/javascripts/pages/projects/settings/integrations/show/index.js' | [:integrations_fe, :frontend]
'ee/app/assets/javascripts/pages/groups/hooks/index.js' | [:integrations_fe, :frontend]
'app/views/clusters/clusters/_integrations_tab.html.haml' | [:frontend]
'app/assets/javascripts/alerts_settings/graphql/fragments/integration_item.fragment.graphql' | [:frontend]
'app/assets/javascripts/filtered_search/droplab/hook_input.js' | [:frontend]
end
with_them do
......@@ -212,6 +260,11 @@ RSpec.describe Tooling::Danger::ProjectHelper do
[:backend, :product_intelligence] | '+ count(User.active)' | ['lib/gitlab/usage_data/topology.rb']
[:backend, :product_intelligence] | '+ foo_count(User.active)' | ['lib/gitlab/usage_data.rb']
[:backend] | '+ count(User.active)' | ['user.rb']
[:integrations_be, :database, :migration] | '+ add_column :integrations, :foo, :text' | ['db/migrate/foo.rb']
[:integrations_be, :database, :migration] | '+ create_table :zentao_tracker_data do |t|' | ['ee/db/post_migrate/foo.rb']
[:integrations_be, :backend] | '+ Integrations::Foo' | ['app/foo/bar.rb']
[:integrations_be, :backend] | '+ project.execute_hooks(foo, :bar)' | ['ee/lib/ee/foo.rb']
[:integrations_be, :backend] | '+ project.execute_integrations(foo, :bar)' | ['app/foo.rb']
end
with_them do
......
......@@ -44,6 +44,28 @@ module Tooling
%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 |
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment