import click


def split_issues(ctx, param, value):
    """
    Split issue arguments into number and URL components.
    """
    def _split_one(value):
        parts = [x.strip() for x in value.split(':', 1) if x.strip()]
        if len(parts) < 1:
            raise click.BadParameter(
                'Invalid issue format, should be issue_number or '
                'issue_number:issue_url')
        elif len(parts) < 2:
            parts = parts + ['ISSUE_URL_HERE']
        return tuple(parts)
    return [_split_one(v) for v in value]