diff --git a/retired_rules/helping-hand.yml b/retired_rules/helping-hand.yml index 984fff0..3a6a2f1 100644 --- a/retired_rules/helping-hand.yml +++ b/retired_rules/helping-hand.yml @@ -19,7 +19,7 @@ issuer_id: fedora-project trigger: all: - topic: buildsys.build.state.change - - lambda: msg.get('msg', {}).get('new', None) is 1 + - lambda: msg.get('msg', {}).get('new', None) == 1 - lambda: msg.get('msg', {}).get('instance', None) == 'primary' # This is the most complex criteria we have to date. The badge is only awarded diff --git a/rules/koji-its-over-9000.yml b/rules/koji-its-over-9000.yml index 5cc49c2..7ea7baf 100644 --- a/rules/koji-its-over-9000.yml +++ b/rules/koji-its-over-9000.yml @@ -11,7 +11,7 @@ issuer_id: fedora-project trigger: all: - topic: buildsys.build.state.change - - lambda: msg.get('msg', {}).get('new', None) is 1 + - lambda: msg.get('msg', {}).get('new', None) == 1 # Once the check has been triggered, this defines what we actually check. criteria: @@ -23,7 +23,7 @@ criteria: - "%(msg.owner)s" # The user that was created. rows_per_page: 9999999 operation: - lambda: sum(1 for msg in query.all() if msg.msg['new'] is 1) + lambda: sum(1 for msg in query.all() if msg.msg['new'] == 1) condition: greater than or equal to: 9001 diff --git a/rules/koji-the-tower-of-babel.yml b/rules/koji-the-tower-of-babel.yml index c448bef..2fddc3f 100644 --- a/rules/koji-the-tower-of-babel.yml +++ b/rules/koji-the-tower-of-babel.yml @@ -11,7 +11,7 @@ issuer_id: fedora-project trigger: all: - topic: buildsys.build.state.change - - lambda: msg.get('msg', {}).get('new', None) is 1 + - lambda: msg.get('msg', {}).get('new', None) == 1 # Once the check has been triggered, this defines what we actually check. criteria: @@ -23,7 +23,7 @@ criteria: - "%(msg.owner)s" # The user that was created. rows_per_page: 9999999 operation: - lambda: sum(1 for msg in query.all() if msg.msg['new'] is 1) + lambda: sum(1 for msg in query.all() if msg.msg['new'] == 1) condition: greater than or equal to: 10000 diff --git a/rules/koji-what-goes-up-01.yml b/rules/koji-what-goes-up-01.yml index 10071c3..67904b3 100644 --- a/rules/koji-what-goes-up-01.yml +++ b/rules/koji-what-goes-up-01.yml @@ -19,7 +19,7 @@ issuer_id: fedora-project trigger: all: - topic: buildsys.build.state.change - - lambda: msg.get('msg', {}).get('new', None) is 3 + - lambda: msg.get('msg', {}).get('new', None) == 3 # Once the check has been triggered, this defines what we actually check. criteria: @@ -31,7 +31,7 @@ criteria: - "%(msg.owner)s" # The user that was created. rows_per_page: 9999999 operation: - lambda: sum(1 for msg in query.all() if msg.msg['new'] is 3) + lambda: sum(1 for msg in query.all() if msg.msg['new'] == 3) condition: greater than or equal to: 1 diff --git a/rules/koji-what-goes-up-02.yml b/rules/koji-what-goes-up-02.yml index ab11147..2d3879c 100644 --- a/rules/koji-what-goes-up-02.yml +++ b/rules/koji-what-goes-up-02.yml @@ -19,7 +19,7 @@ issuer_id: fedora-project trigger: all: - topic: buildsys.build.state.change - - lambda: msg.get('msg', {}).get('new', None) is 3 + - lambda: msg.get('msg', {}).get('new', None) == 3 # Once the check has been triggered, this defines what we actually check. criteria: @@ -31,7 +31,7 @@ criteria: - "%(msg.owner)s" # The user that was created. rows_per_page: 9999999 operation: - lambda: sum(1 for msg in query.all() if msg.msg['new'] is 3) + lambda: sum(1 for msg in query.all() if msg.msg['new'] == 3) condition: greater than or equal to: 5 diff --git a/rules/koji-what-goes-up-03.yml b/rules/koji-what-goes-up-03.yml index 5aee68e..3f7e82b 100644 --- a/rules/koji-what-goes-up-03.yml +++ b/rules/koji-what-goes-up-03.yml @@ -19,7 +19,7 @@ issuer_id: fedora-project trigger: all: - topic: buildsys.build.state.change - - lambda: msg.get('msg', {}).get('new', None) is 3 + - lambda: msg.get('msg', {}).get('new', None) == 3 # Once the check has been triggered, this defines what we actually check. criteria: @@ -31,7 +31,7 @@ criteria: - "%(msg.owner)s" # The user that was created. rows_per_page: 9999999 operation: - lambda: sum(1 for msg in query.all() if msg.msg['new'] is 3) + lambda: sum(1 for msg in query.all() if msg.msg['new'] == 3) condition: greater than or equal to: 20 diff --git a/rules/koji-what-goes-up-04.yml b/rules/koji-what-goes-up-04.yml index c40b088..9f90d10 100644 --- a/rules/koji-what-goes-up-04.yml +++ b/rules/koji-what-goes-up-04.yml @@ -19,7 +19,7 @@ issuer_id: fedora-project trigger: all: - topic: buildsys.build.state.change - - lambda: msg.get('msg', {}).get('new', None) is 3 + - lambda: msg.get('msg', {}).get('new', None) == 3 # Once the check has been triggered, this defines what we actually check. criteria: @@ -31,7 +31,7 @@ criteria: - "%(msg.owner)s" # The user that was created. rows_per_page: 9999999 operation: - lambda: sum(1 for msg in query.all() if msg.msg['new'] is 3) + lambda: sum(1 for msg in query.all() if msg.msg['new'] == 3) condition: greater than or equal to: 100 diff --git a/rules/koji-what-goes-up-05.yml b/rules/koji-what-goes-up-05.yml index 7f17e0e..dcdb1a9 100644 --- a/rules/koji-what-goes-up-05.yml +++ b/rules/koji-what-goes-up-05.yml @@ -19,7 +19,7 @@ issuer_id: fedora-project trigger: all: - topic: buildsys.build.state.change - - lambda: msg.get('msg', {}).get('new', None) is 3 + - lambda: msg.get('msg', {}).get('new', None) == 3 # Once the check has been triggered, this defines what we actually check. criteria: @@ -31,7 +31,7 @@ criteria: - "%(msg.owner)s" # The user that was created. rows_per_page: 9999999 operation: - lambda: sum(1 for msg in query.all() if msg.msg['new'] is 3) + lambda: sum(1 for msg in query.all() if msg.msg['new'] == 3) condition: greater than or equal to: 250 diff --git a/rules/taming_the_beasts.yml b/rules/taming_the_beasts.yml index 7986cb7..64a79a9 100644 --- a/rules/taming_the_beasts.yml +++ b/rules/taming_the_beasts.yml @@ -12,7 +12,7 @@ issuer_id: fedora-project trigger: all: - topic: buildsys.build.state.change - - lambda: msg.get('msg', {}).get('new', None) is 1 + - lambda: msg.get('msg', {}).get('new', None) == 1 - lambda: msg.get('msg', {}).get('instance', 'primary') != 'primary' criteria: @@ -24,7 +24,7 @@ criteria: - "%(msg.owner)s" # The user that was created. rows_per_page: 9999999 operation: - lambda: len([msg for msg in query.all() if msg.msg['new'] is 1 and msg.msg.get('instance', 'primary') != 'primary']) + lambda: len([msg for msg in query.all() if msg.msg['new'] == 1 and msg.msg.get('instance', 'primary') != 'primary']) condition: greater than or equal to: 100