def _repo_name()

in asfyaml/envvars.py [0:0]


def _repo_name():
    path = filter(None, os.environ.get("PATH_INFO", "").split("/"))
    path = filter(lambda p: p != "git-receive-pack", list(path))
    plist = list(path)
    if len(plist) != 1:
        raise ValueError("Invalid PATH_INFO: %s" % os.environ.get("PATH_INFO"))
    return plist[0].removesuffix(".git")