%YAML 1.2 --- # This is some metadata about the badge name: Corporate Shill description: You submitted 50 Bodhi updates for an EPEL branch. creator: ralph discussion: https://pagure.io/design/issue/220 image_url: https://badges.fedoraproject.org/pngs/corporate-shill.png issuer_id: fedora-project # We'll perform our more costly check (defined below) only when # we receive messages that match this 'trigger' trigger: all: - topic: bodhi.update.request.testing - lambda: msg.get('msg', {}).get('update', {}).get('release', {}).get('id_prefix', None) == 'FEDORA-EPEL' # Once the check has been triggered, this defines what we actually check. criteria: datanommer: filter: topics: - "%(topic)s" # The topic of the message that triggered us. users: - "%(msg.update.user.name)s" # The user that was created. rows_per_page: 9999999 operation: lambda: len([msg for msg in query.all() if msg.msg['update']['release']['id_prefix'] == 'FEDORA-EPEL']) condition: greater than or equal to: 50 recipient: "%(msg.update.user.name)s"