def to_hyperlink_base(git_remote_url: str) -> str:
    """
    Map (surject, normalize) urls like

        git@gitlub.ua:user/repo
        git@gitlub.ua:user/repo/
        https://gitlub.ua/user/repo
        https://gitlub.ua/user/repo.git
        https://gitlub.ua/user/repo/
        https://gitlub.ua/user/repo.git/

    to
        https://gitlub.ua/user/repo
    """
    # (The above examples are perfect for a unit test. A doctest would retain example
    # locality).
    url = git_remote_url
    if url.startswith("git@"):
        url = "https://" + url.removeprefix("git@").replace(":", "/")
    return url.removesuffix("/").removesuffix(".git")