1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

chore: add flag to experimental.ts (#5925)

This change adds the new changeRequestConflictHandling flag to Unleash.
This commit is contained in:
Thomas Heartman 2024-01-17 13:55:58 +04:00 committed by GitHub
parent 2b1111044f
commit bbaf574841
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View File

@ -78,6 +78,7 @@ exports[`should create default config 1`] = `
"automatedActions": false, "automatedActions": false,
"caseInsensitiveInOperators": false, "caseInsensitiveInOperators": false,
"celebrateUnleash": false, "celebrateUnleash": false,
"changeRequestConflictHandling": false,
"customRootRolesKillSwitch": false, "customRootRolesKillSwitch": false,
"demo": false, "demo": false,
"detectSegmentUsageInChangeRequests": false, "detectSegmentUsageInChangeRequests": false,

View File

@ -43,7 +43,8 @@ export type IFlagKey =
| 'edgeBulkMetricsKillSwitch' | 'edgeBulkMetricsKillSwitch'
| 'extendedUsageMetrics' | 'extendedUsageMetrics'
| 'extendedUsageMetricsUI' | 'extendedUsageMetricsUI'
| 'adminTokenKillSwitch'; | 'adminTokenKillSwitch'
| 'changeRequestConflictHandling';
export type IFlags = Partial<{ [key in IFlagKey]: boolean | Variant }>; export type IFlags = Partial<{ [key in IFlagKey]: boolean | Variant }>;
@ -198,6 +199,10 @@ const flags: IFlags = {
process.env.UNLEASH_EXPERIMENTAL_ADMIN_TOKEN_KILL_SWITCH, process.env.UNLEASH_EXPERIMENTAL_ADMIN_TOKEN_KILL_SWITCH,
false, false,
), ),
changeRequestConflictHandling: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_CHANGE_REQUEST_CONFLICT_HANDLING,
false,
),
}; };
export const defaultExperimentalOptions: IExperimentalOptions = { export const defaultExperimentalOptions: IExperimentalOptions = {