Particular pagure project tags

     Adding this rule allows you to get notifications for one or more
     `pagure.io <https://pagure.io>`_ projects having the specified tags.
     Specify multiple tags by separating them with a comma ','.

def pagure_specific_project_tag_filter(config, message, tags=None, *args, **kw):
    """ Particular pagure project tags

     Adding this rule allows you to get notifications for one or more
     `pagure.io <https://pagure.io>`_ projects having the specified tags.
     Specify multiple tags by separating them with a comma ','.
     """

    if not pagure_catchall(config, message):
        return False

    tags = tags.split(',') if tags else []
    tags = [tag.strip() for tag in tags if tag and tag.strip()]

    project_tags = set()
    project_tags.update(message.get('project', {}).get('tags', []))
    project_tags.update(
        message.get('pullrequest', {}).get('project', {}).get('tags', []))
    project_tags.update(
        message.get('commit', {}).get('repo', {}).get('tags', []))

    valid = len(project_tags.intersection(set(tags))) > 0

    return valid