-
Notifications
You must be signed in to change notification settings - Fork 83
feat: Added support for sdkKey and environmentKey in OptimizelyConfig #683
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
2e77149
to
0777a6b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
private datafile: string; | ||
|
||
constructor(configObj: ProjectConfig, datafile: string) { | ||
this.experimentsMap = OptimizelyConfig.getExperimentsMap(configObj); | ||
this.featuresMap = OptimizelyConfig.getFeaturesMap(configObj, this.experimentsMap); | ||
this.revision = configObj.revision; | ||
this.datafile = datafile; | ||
|
||
if (configObj.sdkKey) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we combine both conditions? e.g.
if (configObj.sdkKey && configObj.enviornmentKey) {
}
it's not possible any of the key is present and the other one is not.
Summary
sdkKey
andenvironmentKey
in datafile, ProjectConfig, and OptimizelyConfig.Test plan
Existing unit tests + new tests + FSC