import click


def validate_token(ctx, param, value):
    """Validate that there is a token."""
    if not value:
        raise click.BadParameter('Either pass a token or set the env variable GITHUB_TOKEN')
    return value