def get_plan_title()

in modules/testrail_integration.py [0:0]


def get_plan_title(version_str: str, channel: str) -> str:
    """Given a version string, get the plan_title"""

    version_match = FX_PRERC_VERSION_RE.match(version_str)
    if channel == "Devedition":
        logging.info(f"DevEdition: {version_str}")
        version_match = FX_DEVED_VERSION_RE.match(version_str)
        (major, minor, beta) = [version_match[n] for n in range(1, 4)]
        plan_title = (
            TESTRAIL_RUN_FMT.replace("{channel}", channel)
            .replace("{major}", major)
            .replace("{minor}", minor)
            .replace("{beta}", beta)
            .split("-")[0]
        )
    elif version_match:
        logging.info(version_match)
        (major, minor, beta, build) = [version_match[n] for n in range(1, 5)]
        logging.info(f"major {major} minor {minor} beta {beta} build {build}")
        plan_title = (
            TESTRAIL_RUN_FMT.replace("{channel}", channel)
            .replace("{major}", major)
            .replace("{minor}", minor)
            .replace("{beta}", beta)
            .replace("{build}", build)
        )
    else:
        # Version doesn't look like a normal beta, someone updated to the RC
        version_match = FX_RC_VERSION_RE.match(version_str)
        (major, minor) = [version_match[n] for n in range(1, 3)]
        plan_title = (
            TESTRAIL_RUN_FMT.replace("{channel}", channel)
            .replace("{major}", major)
            .replace("{minor}", minor)
            .replace("{beta}", "rc")
        )
    return plan_title