def METHOD_NAME(remote):
    """
    Parse out a GitLab HTTP URL from a remote URI:
    r1 = remote_to_url("git://gitlab.com/asfaltboy/GitSavvy.git")
    assert r1 == "https://gitlab.com/asfaltboy/GitSavvy.git"
    r2 = remote_to_url("git@gitlab.com:asfaltboy/GitSavvy.git")
    assert r2 == "https://gitlab.com/asfaltboy/GitSavvy.git"
    r3 = remote_to_url("https://gitlab.com/asfaltboy/GitSavvy.git")
    assert r3 == "https://gitlab.com/asfaltboy/GitSavvy.git"
    """
    if remote.endswith(".git"):
        remote = remote[:-4]
    if remote.startswith("git@"):
        return remote.replace(":", "/").replace("git@", "https://")
    elif remote.startswith("git://"):
        return remote.replace("git://", "https://")
    elif remote.startswith("http"):
        return remote
    else:
        util.debug.log_error('Cannot parse remote "%s" to url' % remote)
        return None