import fnmatch


def repo_matches(repo, pattern):
    """Match a repo against a filename pattern.

    True if either the name or the full_name of the repo matches.
    """
    return (
        fnmatch.fnmatch(repo.full_name, pattern) or
        fnmatch.fnmatch(repo.name, pattern)
    )