Skip to content

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

Merged
merged 5 commits into from
Jun 17, 2021

Conversation

yavorona
Copy link
Contributor

@yavorona yavorona commented Jun 15, 2021

Summary

  • Added support for sdkKey and environmentKey in datafile, ProjectConfig, and OptimizelyConfig.

Test plan

Existing unit tests + new tests + FSC

@coveralls
Copy link

coveralls commented Jun 15, 2021

Coverage Status

Coverage increased (+0.005%) to 96.982% when pulling ed6bf0e on pnguen/add-sdkkey-and-envkey-to-datafile into 88fded0 on master.

@yavorona yavorona closed this Jun 16, 2021
@yavorona yavorona reopened this Jun 16, 2021
@yavorona yavorona force-pushed the pnguen/add-sdkkey-and-envkey-to-datafile branch from 2e77149 to 0777a6b Compare June 16, 2021 23:55
@yavorona yavorona removed their assignment Jun 17, 2021
Copy link
Contributor

@jaeopt jaeopt left a 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) {
Copy link
Contributor

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.

@yavorona yavorona merged commit a4dcc3e into master Jun 17, 2021
@yavorona yavorona deleted the pnguen/add-sdkkey-and-envkey-to-datafile branch June 17, 2021 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants