Browse Source

feat(workflow): Replace ignored with escalating in settings (#46639)

Scott Cooper 1 year ago
parent
commit
4c70942a80

+ 0 - 6
static/app/views/settings/organizationDeveloperSettings/constants.tsx

@@ -1,11 +1,5 @@
 export const EVENT_CHOICES = ['issue', 'error', 'comment'] as const;
 
-export const DESCRIPTIONS = {
-  issue: 'created, resolved, assigned, ignored',
-  error: 'created',
-  comment: 'created, edited, deleted',
-} as const;
-
 export const PERMISSIONS_MAP = {
   issue: 'Event',
   error: 'Event',

+ 9 - 1
static/app/views/settings/organizationDeveloperSettings/subscriptionBox.tsx

@@ -8,7 +8,6 @@ import {space} from 'sentry/styles/space';
 import {Organization} from 'sentry/types';
 import withOrganization from 'sentry/utils/withOrganization';
 import {
-  DESCRIPTIONS,
   EVENT_CHOICES,
   PERMISSIONS_MAP,
 } from 'sentry/views/settings/organizationDeveloperSettings/constants';
@@ -53,6 +52,15 @@ function SubscriptionBox({
     message = t('Cannot enable webhook subscription without specifying a webhook url');
   }
 
+  const DESCRIPTIONS: Record<(typeof EVENT_CHOICES)[number], string> = {
+    // Swap ignored for escalating if the feature is enabled
+    issue: `created, resolved, assigned, ${
+      features.includes('escalating-issues') ? 'escalating' : 'ignored'
+    }`,
+    error: 'created',
+    comment: 'created, edited, deleted',
+  };
+
   return (
     <Tooltip disabled={!disabled} title={message} key={resource}>
       <SubscriptionGridItem disabled={disabled}>