mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-09-29 22:34:33 +00:00
34 lines
773 B
TypeScript
34 lines
773 B
TypeScript
import {IssueAlertRule} from 'sentry/types/alerts';
|
|
|
|
export function ProjectAlertRuleFixture(
|
|
params: Partial<IssueAlertRule> = {}
|
|
): IssueAlertRule {
|
|
return {
|
|
id: '1',
|
|
name: 'My alert rule',
|
|
environment: 'staging',
|
|
actionMatch: 'all',
|
|
filterMatch: 'all',
|
|
conditions: [
|
|
{
|
|
id: 'sentry.rules.conditions.first_seen_event.FirstSeenEventCondition',
|
|
name: 'A new issue is created',
|
|
},
|
|
],
|
|
actions: [
|
|
{
|
|
id: 'sentry.rules.actions.notify_event.NotifyEventAction',
|
|
name: 'Send a notification (for all legacy integrations)',
|
|
},
|
|
],
|
|
filters: [],
|
|
createdBy: null,
|
|
dateCreated: '',
|
|
projects: [],
|
|
snooze: false,
|
|
frequency: 1,
|
|
status: 'active',
|
|
...params,
|
|
};
|
|
}
|