diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-13 03:11:03 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-13 03:11:03 +0300 |
commit | a125ac8a014fc86f8c716229835ed0a0403a6e91 (patch) | |
tree | b72524d8c77b46bb3a3f12912f886001977f6102 /app | |
parent | 5dc3d39cca076fc6f05fc005d5620bfa3d09be17 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/experimentation/utils.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/app/assets/javascripts/experimentation/utils.js b/app/assets/javascripts/experimentation/utils.js index 9ae6f6b3fdd..dcb6a8e20a3 100644 --- a/app/assets/javascripts/experimentation/utils.js +++ b/app/assets/javascripts/experimentation/utils.js @@ -12,7 +12,15 @@ function getExperimentsData() { } function convertExperimentDataToExperimentContext(experimentData) { - return { schema: TRACKING_CONTEXT_SCHEMA, data: experimentData }; + // Bandaid to allow-list only the properties which the current gitlab_experiment context schema suppports. + // See TRACKING_CONTEXT_SCHEMA for current version (1-0-0) + // https://gitlab.com/gitlab-org/iglu/-/blob/master/public/schemas/com.gitlab/gitlab_experiment/jsonschema/1-0-0 + const { experiment: experimentName, key, variant, migration_keys } = experimentData; + + return { + schema: TRACKING_CONTEXT_SCHEMA, + data: { experiment: experimentName, key, variant, migration_keys }, + }; } export function getExperimentData(experimentName) { |