Browse Source

fix(ecosystem): Remove unused codeowners analytics (#47581)

Scott Cooper 1 year ago
parent
commit
c4a96f5921

+ 0 - 21
static/app/utils/analytics/integrations/codeownersAnalyticsEvents.ts

@@ -1,21 +0,0 @@
-import {IntegrationView} from './index';
-
-export enum CodeownersEvents {
-  SETUP_CTA = 'integrations.code_owners_cta_setup_clicked',
-  DOCS_CTA = 'integrations.code_owners_cta_docs_clicked',
-  SHOW_PROMPT = 'integrations.show_code_owners_prompt',
-  DISMISS_PROMPT = 'integrations.dismissed_code_owners_prompt',
-}
-// This type allows analytics functions to use the string literal or enum.KEY
-type CodeownersEventsLiterals = `${CodeownersEvents}`;
-
-export type CodeownersEventParameters = {
-  [key in CodeownersEventsLiterals]: {project_id: string} & IntegrationView;
-};
-
-export const codeownersEventMap: Record<CodeownersEventsLiterals, string> = {
-  [CodeownersEvents.SETUP_CTA]: 'Integrations: Code Owners CTA Setup Clicked',
-  [CodeownersEvents.DOCS_CTA]: 'Integrations: Code Owners CTA Docs Clicked',
-  [CodeownersEvents.SHOW_PROMPT]: 'Integrations: Show Code Owners Prompt',
-  [CodeownersEvents.DISMISS_PROMPT]: 'Integrations: Dismissed Code Owners Prompt',
-};

+ 1 - 4
static/app/utils/analytics/integrations/index.ts

@@ -1,6 +1,5 @@
 import {IntegrationType, SentryAppStatus} from 'sentry/types';
 
-import {codeownersEventMap, CodeownersEventParameters} from './codeownersAnalyticsEvents';
 import {platformEventMap, PlatformEventParameters} from './platformAnalyticsEvents';
 
 export type IntegrationView = {
@@ -86,8 +85,7 @@ export type IntegrationEventParameters = {
   'integrations.upgrade_plan_modal_opened': SingleIntegrationEventParams;
   'project_ownership.modal_opened': ProjectOwnershipModalParams;
   'project_ownership.saved': ProjectOwnershipModalParams;
-} & CodeownersEventParameters &
-  PlatformEventParameters;
+} & PlatformEventParameters;
 
 export type IntegrationAnalyticsKey = keyof IntegrationEventParameters;
 
@@ -120,6 +118,5 @@ export const integrationEventMap: Record<IntegrationAnalyticsKey, string> = {
   'integrations.switch_manual_sdk_setup': 'Integrations: Switch Manual SDK Setup',
   'project_ownership.modal_opened': 'Project Ownership: Modal Opened',
   'project_ownership.saved': 'Project Ownership: Saved',
-  ...codeownersEventMap,
   ...platformEventMap,
 };