Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-11-13 03:11:03 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-11-13 03:11:03 +0300
commita125ac8a014fc86f8c716229835ed0a0403a6e91 (patch)
treeb72524d8c77b46bb3a3f12912f886001977f6102 /app
parent5dc3d39cca076fc6f05fc005d5620bfa3d09be17 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/experimentation/utils.js10
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) {