import re


def github_username(s):
    """Is this a valid GitHub username?"""
    # Usernames can have "[bot]" at the end for bots.
    suffixes = ["[bot]", "%5Bbot%5D"]
    for suffix in suffixes:
        if s.endswith(suffix):
            s = s[:-len(suffix)]
            break
    # For Anant, we added a star just to be sure we wouldn't find some other
    # account, so allow a star at the end.
    return re.match(r"^[a-zA-Z0-9_-]+\*?$", s)