Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into EVG-19395-feature-branch
Browse files Browse the repository at this point in the history
  • Loading branch information
SupaJoon committed Nov 2, 2023
2 parents 9bc7abd + 8f2f1cd commit 7a8da14
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "spruce",
"version": "3.0.165",
"version": "3.0.166",
"private": true,
"scripts": {
"bootstrap-logkeeper": "./scripts/bootstrap-logkeeper.sh",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,8 @@ export const getFormSchema = (
},
{
type: "string" as "string",
title:
PatchTriggerAliasStatus[PatchStatus.LegacySucceeded],
enum: [PatchStatus.LegacySucceeded],
title: PatchTriggerAliasStatus[PatchStatus.Success],
enum: [PatchStatus.Success],
},
{
type: "string" as "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const repoForm: PatchAliasesFormState = {
{
alias: "alias1",
childProjectIdentifier: "spruce",
status: "succeeded",
status: "success",
displayTitle: "alias1",
parentAsModule: "",
isGithubTriggerAlias: true,
Expand Down Expand Up @@ -124,7 +124,7 @@ const repoResult: Pick<RepoSettingsInput, "projectRef" | "aliases"> = {
variantRegex: ".*",
},
],
status: "succeeded",
status: "success",
parentAsModule: "",
},
],
Expand Down
10 changes: 5 additions & 5 deletions src/pages/projectSettings/tabs/PatchAliasesTab/transformers.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ProjectSettingsTabRoutes } from "constants/routes";
import { PatchStatus } from "types/patch";
import { FormToGqlFunction, GqlToFormFunction } from "../types";
import { alias as aliasUtils, ProjectType } from "../utils";
import { TaskSpecifier } from "./types";
Expand All @@ -7,12 +8,11 @@ const { sortAliases, transformAliases } = aliasUtils;

type Tab = ProjectSettingsTabRoutes.PatchAliases;

// Ensure that the front end can ingest patch trigger alias status filters that use either "success" or "succeeded".
// For now, use "succeeded" for either.
// TODO EVG-20704: Save patch trigger aliases with "success" instead of "succeeded".
// Ensure that the front end can ingest patch trigger alias status filters that use either "success" or "succeeded" and convert them to "success".
// TODO EVG-20032: Remove conversion.
const migrateSuccessStatus = (status: string) => {
if (status === "success") {
return "succeeded";
if (status === PatchStatus.LegacySucceeded) {
return PatchStatus.Success;
}
return status ?? "";
};
Expand Down
1 change: 1 addition & 0 deletions src/types/patch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export enum PatchStatus {
Created = "created",
Failed = "failed",
Started = "started",
// TODO EVG-20032: Remove legacy status
LegacySucceeded = "succeeded",
Success = "success",
Aborted = "aborted",
Expand Down

0 comments on commit 7a8da14

Please sign in to comment.