mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-09-29 22:34:33 +00:00
19 lines
617 B
TypeScript
19 lines
617 B
TypeScript
import type {Organization} from 'sentry/types';
|
|
import type {MetricRule} from 'sentry/views/alerts/rules/metric/types';
|
|
import {Dataset} from 'sentry/views/alerts/rules/metric/types';
|
|
|
|
/**
|
|
* Enable ignoring archived issues in metric alerts
|
|
*/
|
|
export const hasIgnoreArchivedFeatureFlag = (organization: Organization): boolean =>
|
|
organization.features.includes('metric-alert-ignore-archived');
|
|
|
|
export const ruleNeedsErrorMigration = (rule: MetricRule): boolean => {
|
|
return (
|
|
'dataset' in rule &&
|
|
rule.dataset === Dataset.ERRORS &&
|
|
'query' in rule &&
|
|
!rule.query.includes('is:unresolved')
|
|
);
|
|
};
|