Skip to content

Commit

Permalink
fix: Change alert type to undercase
Browse files Browse the repository at this point in the history
  • Loading branch information
josephgregoryii committed Oct 14, 2024
1 parent 13f3515 commit 1028159
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions utils/lib/Alert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type {
AlertType,
QuickstartAlertInput,
} from '../types/QuickstartMutationVariable';
import type { ArtifactAlertConfig } from '../types/Artifact';
import type { ArtifactAlertConfig, ArtifactAlertType } from '../types/Artifact';
import type { QuickstartConfigAlert } from '../types/QuickstartConfig';
import type { NerdGraphResponseWithLocalErrors } from '../types/nerdgraph';

Expand Down Expand Up @@ -159,7 +159,7 @@ class Alert extends Component<
displayName: name && name.trim(),
rawConfiguration: JSON.stringify(condition),
sourceUrl: Component.getAssetSourceUrl(this.configPath),
type: type && (type.trim() as AlertType),
type: type && (type.trim().toLowerCase() as ArtifactAlertType),
};
});

Expand Down
2 changes: 1 addition & 1 deletion utils/schema/artifact.json
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@
"type": "object",
"properties": {
"type": {
"enum": ["BASELINE", "STATIC"],
"enum": ["baseline", "static"],
"type": "string",
"nullable": true
},
Expand Down
4 changes: 2 additions & 2 deletions utils/types/Artifact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,14 @@ export interface ArtifactDashboardConfig {

/* --- Alert --- */

type AlertType = 'BASELINE' | 'STATIC';
export type ArtifactAlertType = 'baseline' | 'static';

type ArtifactAlert = {
description?: string;
displayName: string;
rawConfiguration: string;
sourceUrl?: string;
type: AlertType;
type: ArtifactAlertType;
};

export interface ArtifactAlertConfig {
Expand Down

0 comments on commit 1028159

Please sign in to comment.