in scripts/validate.py [0:0]
def get_branch_message(branch):
"""Return the message from an experiment branch."""
# TODO: This does not support multi-feature experiments.
feature = branch["feature"]
feature_id = feature["featureId"]
if feature_id == "cfr":
value = feature["value"]
if value is not None and "id" in value:
return "cfr", feature["value"]
return "cfr", None
elif feature_id == "aboutwelcome":
value = feature["value"]
if value is None:
return "onboarding-multistage", None
elif "cards" in value:
return "onboarding", value["cards"]
elif "screens" in value:
return "onboarding-multistage", value
else:
return "onboarding", None
elif feature_id == "moments-page":
if "id" in feature["value"]:
return "moments-page", feature["value"]
return "moments-page", None
else:
return None, None