Skip to content

Commit fd61b71

Browse files
🛠️ apply pre-commit fixes
1 parent 0eae557 commit fd61b71

File tree

4 files changed

+49
-40
lines changed

4 files changed

+49
-40
lines changed

static/app/views/automations/components/automationListRow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ type AutomationListRowProps = {
1818
automation: Automation;
1919
handleSelect: (id: string, checked: boolean) => void;
2020
selected: boolean;
21-
}
21+
};
2222

2323
export function AutomationListRow({
2424
automation,

tests/js/fixtures/automations.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import { DataConditionGroupFixture } from "sentry-fixture/dataConditions";
2-
import { Automation } from "sentry/types/workflowEngine/automations";
1+
import {DataConditionGroupFixture} from 'sentry-fixture/dataConditions';
2+
3+
import {Automation} from 'sentry/types/workflowEngine/automations';
34

45
export function AutomationFixture(params: Partial<Automation>): Automation {
56
return {
@@ -9,6 +10,6 @@ export function AutomationFixture(params: Partial<Automation>): Automation {
910
actionFilters: [],
1011
detectorIds: [],
1112
triggers: DataConditionGroupFixture({}),
12-
...params
13-
}
13+
...params,
14+
};
1415
}

tests/js/fixtures/dataConditions.ts

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,28 @@
1-
import { DataCondition, DataConditionGroup, DataConditionGroupLogicType, DataConditionType } from 'sentry/types/workflowEngine/dataConditions';
1+
import {
2+
DataCondition,
3+
DataConditionGroup,
4+
DataConditionGroupLogicType,
5+
DataConditionType,
6+
} from 'sentry/types/workflowEngine/dataConditions';
27

38
export function DataConditionFixture(params: Partial<DataCondition>): DataCondition {
49
return {
510
type: DataConditionGroupLogicType.ALL,
611
comparison_type: DataConditionType.EQUAL,
712
comparison: '8',
813
id: '1',
9-
...params
10-
}
14+
...params,
15+
};
1116
}
1217

13-
export function DataConditionGroupFixture(params: Partial<DataConditionGroup>): DataConditionGroup {
18+
export function DataConditionGroupFixture(
19+
params: Partial<DataConditionGroup>
20+
): DataConditionGroup {
1421
return {
1522
conditions: [DataConditionFixture({})],
1623
id: '1',
1724
logicType: DataConditionGroupLogicType.ANY,
1825
actions: [],
19-
...params
20-
}
26+
...params,
27+
};
2128
}

tests/js/fixtures/detectors.ts

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,35 @@
1-
import { Detector } from "sentry/types/workflowEngine/detectors";
2-
import { UserFixture } from "sentry-fixture/user";
3-
import { DataConditionGroupFixture } from "sentry-fixture/dataConditions";
1+
import {DataConditionGroupFixture} from 'sentry-fixture/dataConditions';
2+
import {UserFixture} from 'sentry-fixture/user';
3+
4+
import {Detector} from 'sentry/types/workflowEngine/detectors';
45

56
export function DetectorFixture(params: Partial<Detector>): Detector {
6-
return {
7+
return {
8+
id: '1',
9+
name: 'detector',
10+
projectId: '1',
11+
createdBy: UserFixture().id,
12+
dateCreated: new Date('2025-01-01T00:00:00.000Z'),
13+
dateUpdated: new Date('2025-01-01T00:00:00.000Z'),
14+
lastTriggered: new Date('2025-01-01T00:00:00.000Z'),
15+
workflowIds: [],
16+
config: {},
17+
type: 'metric',
18+
dataCondition: DataConditionGroupFixture({}),
19+
disabled: false,
20+
dataSource: {
721
id: '1',
8-
name: 'detector',
9-
projectId: '1',
10-
createdBy: UserFixture().id,
11-
dateCreated: new Date('2025-01-01T00:00:00.000Z'),
12-
dateUpdated: new Date('2025-01-01T00:00:00.000Z'),
13-
lastTriggered: new Date('2025-01-01T00:00:00.000Z'),
14-
workflowIds: [],
15-
config: {},
16-
type: 'metric',
17-
dataCondition: DataConditionGroupFixture({}),
18-
disabled: false,
19-
dataSource: {
20-
id: '1',
21-
status: 1,
22-
snubaQuery: {
23-
aggregate: '',
24-
dataset: '',
25-
id: '',
26-
query: '',
27-
timeWindow: 60,
28-
...(params.dataSource?.snubaQuery ?? {}),
29-
},
30-
...(params.dataSource ?? {}),
22+
status: 1,
23+
snubaQuery: {
24+
aggregate: '',
25+
dataset: '',
26+
id: '',
27+
query: '',
28+
timeWindow: 60,
29+
...params.dataSource?.snubaQuery,
3130
},
32-
...params,
33-
};
31+
...params.dataSource,
32+
},
33+
...params,
34+
};
3435
}

0 commit comments

Comments
 (0)