Skip to content

Commit

Permalink
chore: add detect segment usage in CRs flag (#5302)
Browse files Browse the repository at this point in the history
As the title says, this PR adds a flag to unleash for detecting segment
usage in CRs.
  • Loading branch information
thomasheartman authored Nov 8, 2023
1 parent a5288ae commit ebf3102
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/lib/__snapshots__/create-config.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ exports[`should create default config 1`] = `
"customRootRolesKillSwitch": false,
"demo": false,
"dependentFeatures": false,
"detectSegmentUsageInChangeRequests": false,
"disableBulkToggle": false,
"disableEnvsOnRevive": false,
"disableMetrics": false,
Expand Down
8 changes: 7 additions & 1 deletion src/lib/types/experimental.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ export type IFlagKey =
| 'featureSwitchRefactor'
| 'featureSearchAPI'
| 'featureSearchFrontend'
| 'scheduledConfigurationChanges';
| 'scheduledConfigurationChanges'
| 'detectSegmentUsageInChangeRequests';

export type IFlags = Partial<{ [key in IFlagKey]: boolean | Variant }>;

Expand Down Expand Up @@ -172,6 +173,11 @@ const flags: IFlags = {
process.env.UNLEASH_EXPERIMENTAL_SCHEDULED_CONFIGURATION_CHANGES,
false,
),
detectSegmentUsageInChangeRequests: parseEnvVarBoolean(
process.env
.UNLEASH_EXPERIMENTAL_DETECT_SEGMENT_USAGE_IN_CHANGE_REQUESTS,
false,
),
};

export const defaultExperimentalOptions: IExperimentalOptions = {
Expand Down

0 comments on commit ebf3102

Please sign in to comment.