Skip to content

Commit 1028159

Browse files
fix: Change alert type to undercase
1 parent 13f3515 commit 1028159

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

utils/lib/Alert.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import type {
1010
AlertType,
1111
QuickstartAlertInput,
1212
} from '../types/QuickstartMutationVariable';
13-
import type { ArtifactAlertConfig } from '../types/Artifact';
13+
import type { ArtifactAlertConfig, ArtifactAlertType } from '../types/Artifact';
1414
import type { QuickstartConfigAlert } from '../types/QuickstartConfig';
1515
import type { NerdGraphResponseWithLocalErrors } from '../types/nerdgraph';
1616

@@ -159,7 +159,7 @@ class Alert extends Component<
159159
displayName: name && name.trim(),
160160
rawConfiguration: JSON.stringify(condition),
161161
sourceUrl: Component.getAssetSourceUrl(this.configPath),
162-
type: type && (type.trim() as AlertType),
162+
type: type && (type.trim().toLowerCase() as ArtifactAlertType),
163163
};
164164
});
165165

utils/schema/artifact.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@
218218
"type": "object",
219219
"properties": {
220220
"type": {
221-
"enum": ["BASELINE", "STATIC"],
221+
"enum": ["baseline", "static"],
222222
"type": "string",
223223
"nullable": true
224224
},

utils/types/Artifact.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,14 @@ export interface ArtifactDashboardConfig {
8787

8888
/* --- Alert --- */
8989

90-
type AlertType = 'BASELINE' | 'STATIC';
90+
export type ArtifactAlertType = 'baseline' | 'static';
9191

9292
type ArtifactAlert = {
9393
description?: string;
9494
displayName: string;
9595
rawConfiguration: string;
9696
sourceUrl?: string;
97-
type: AlertType;
97+
type: ArtifactAlertType;
9898
};
9999

100100
export interface ArtifactAlertConfig {

0 commit comments

Comments
 (0)