From bbaf574841f2132cb4074f0dc894cc8a7c094cbc Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Wed, 17 Jan 2024 13:55:58 +0400 Subject: [PATCH] chore: add flag to experimental.ts (#5925) This change adds the new changeRequestConflictHandling flag to Unleash. --- src/lib/__snapshots__/create-config.test.ts.snap | 1 + src/lib/types/experimental.ts | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/__snapshots__/create-config.test.ts.snap b/src/lib/__snapshots__/create-config.test.ts.snap index 75b376a9c3..bbdf4a19d3 100644 --- a/src/lib/__snapshots__/create-config.test.ts.snap +++ b/src/lib/__snapshots__/create-config.test.ts.snap @@ -78,6 +78,7 @@ exports[`should create default config 1`] = ` "automatedActions": false, "caseInsensitiveInOperators": false, "celebrateUnleash": false, + "changeRequestConflictHandling": false, "customRootRolesKillSwitch": false, "demo": false, "detectSegmentUsageInChangeRequests": false, diff --git a/src/lib/types/experimental.ts b/src/lib/types/experimental.ts index 1b6068ae3d..dc82cd2d1c 100644 --- a/src/lib/types/experimental.ts +++ b/src/lib/types/experimental.ts @@ -43,7 +43,8 @@ export type IFlagKey = | 'edgeBulkMetricsKillSwitch' | 'extendedUsageMetrics' | 'extendedUsageMetricsUI' - | 'adminTokenKillSwitch'; + | 'adminTokenKillSwitch' + | 'changeRequestConflictHandling'; export type IFlags = Partial<{ [key in IFlagKey]: boolean | Variant }>; @@ -198,6 +199,10 @@ const flags: IFlags = { process.env.UNLEASH_EXPERIMENTAL_ADMIN_TOKEN_KILL_SWITCH, false, ), + changeRequestConflictHandling: parseEnvVarBoolean( + process.env.UNLEASH_EXPERIMENTAL_CHANGE_REQUEST_CONFLICT_HANDLING, + false, + ), }; export const defaultExperimentalOptions: IExperimentalOptions = {