From d9a00152f2800c0186af4fee5a4269a864abef66 Mon Sep 17 00:00:00 2001 From: Clement Verna Date: Jun 17 2019 18:39:40 +0000 Subject: Bodhi 4.0 introduce a new message schema for updates. In the new Bodhi release the update.submitter is replaced by update.user.name. See https://apps.fedoraproject.org/datagrepper/id?id=2019-54f8b285-0c2e-4355-b640-4d184c9fbd0e&is_raw=true&size=extra-large for an example. Signed-off-by: Clement Verna --- diff --git a/rules/bodhi-binary-star.yml b/rules/bodhi-binary-star.yml index 37f8c30..ae956a3 100644 --- a/rules/bodhi-binary-star.yml +++ b/rules/bodhi-binary-star.yml @@ -32,9 +32,9 @@ criteria: topics: - "%(topic)s" # The topic of the message that triggered us. users: - - "%(msg.update.submitter)s" # The user that was created. + - "%(msg.update.user.name)s" # The user that was created. operation: count condition: - greater than or equal to: 1 + greater than or equal to: 1 -recipient: "%(msg.update.submitter)s" +recipient: "%(msg.update.user.name)s" diff --git a/rules/bodhi-take-this.yml b/rules/bodhi-take-this.yml index 759820e..4093465 100644 --- a/rules/bodhi-take-this.yml +++ b/rules/bodhi-take-this.yml @@ -27,9 +27,9 @@ criteria: topics: - "%(topic)s" # The topic of the message that triggered us. users: - - "%(msg.update.submitter)s" # The user that was created. + - "%(msg.update.user.name)s" # The user that was created. operation: count condition: - greater than or equal to: 1 + greater than or equal to: 1 -recipient: "%(msg.update.submitter)s" +recipient: "%(msg.update.user.name)s" diff --git a/rules/bodhi-white-hat.yml b/rules/bodhi-white-hat.yml index 79b8f2d..d33e04f 100644 --- a/rules/bodhi-white-hat.yml +++ b/rules/bodhi-white-hat.yml @@ -21,9 +21,9 @@ criteria: topics: - "%(topic)s" # The topic of the message that triggered us. users: - - "%(msg.update.submitter)s" + - "%(msg.update.user.name)s" operation: count condition: greater than or equal to: 1 -recipient: "%(msg.update.submitter)s" +recipient: "%(msg.update.user.name)s" diff --git a/rules/corporate-drone.yml b/rules/corporate-drone.yml index f1ac8d0..17c9101 100644 --- a/rules/corporate-drone.yml +++ b/rules/corporate-drone.yml @@ -23,9 +23,9 @@ criteria: topics: - "%(topic)s" # The topic of the message that triggered us. users: - - "%(msg.update.submitter)s" # The user that was created. + - "%(msg.update.user.name)s" # The user that was created. operation: count condition: - greater than or equal to: 1 + greater than or equal to: 1 -recipient: "%(msg.update.submitter)s" +recipient: "%(msg.update.user.name)s" diff --git a/rules/corporate-overlord.yml b/rules/corporate-overlord.yml index 5210bfd..174fe01 100644 --- a/rules/corporate-overlord.yml +++ b/rules/corporate-overlord.yml @@ -23,11 +23,11 @@ criteria: topics: - "%(topic)s" # The topic of the message that triggered us. users: - - "%(msg.update.submitter)s" # The user that was created. + - "%(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: 200 -recipient: "%(msg.update.submitter)s" +recipient: "%(msg.update.user.name)s" diff --git a/rules/corporate-shill.yml b/rules/corporate-shill.yml index b704d2c..a284cd1 100644 --- a/rules/corporate-shill.yml +++ b/rules/corporate-shill.yml @@ -23,11 +23,11 @@ criteria: topics: - "%(topic)s" # The topic of the message that triggered us. users: - - "%(msg.update.submitter)s" # The user that was created. + - "%(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.submitter)s" +recipient: "%(msg.update.user.name)s" diff --git a/rules/is-this-thing-on-01.yml b/rules/is-this-thing-on-01.yml index 4781b4a..6c6d2d6 100644 --- a/rules/is-this-thing-on-01.yml +++ b/rules/is-this-thing-on-01.yml @@ -26,9 +26,9 @@ criteria: topics: - "%(topic)s" # The topic of the message that triggered us. users: - - "%(msg.update.submitter)s" # The user that was created. + - "%(msg.update.user.name)s" # The user that was created. operation: count condition: - greater than or equal to: 1 + greater than or equal to: 1 -recipient: "%(msg.update.submitter)s" +recipient: "%(msg.update.user.name)s" diff --git a/rules/is-this-thing-on-02.yml b/rules/is-this-thing-on-02.yml index 4356c11..843870b 100644 --- a/rules/is-this-thing-on-02.yml +++ b/rules/is-this-thing-on-02.yml @@ -26,9 +26,9 @@ criteria: topics: - "%(topic)s" # The topic of the message that triggered us. users: - - "%(msg.update.submitter)s" # The user that was created. + - "%(msg.update.user.name)s" # The user that was created. operation: count condition: greater than or equal to: 20 -recipient: "%(msg.update.submitter)s" +recipient: "%(msg.update.user.name)s" diff --git a/rules/is-this-thing-on-03.yml b/rules/is-this-thing-on-03.yml index 18d8e9f..afce8bf 100644 --- a/rules/is-this-thing-on-03.yml +++ b/rules/is-this-thing-on-03.yml @@ -26,9 +26,9 @@ criteria: topics: - "%(topic)s" # The topic of the message that triggered us. users: - - "%(msg.update.submitter)s" # The user that was created. + - "%(msg.update.user.name)s" # The user that was created. operation: count condition: greater than or equal to: 100 -recipient: "%(msg.update.submitter)s" +recipient: "%(msg.update.user.name)s" diff --git a/rules/is-this-thing-on-04.yml b/rules/is-this-thing-on-04.yml index ccd1d0c..8b6d2e0 100644 --- a/rules/is-this-thing-on-04.yml +++ b/rules/is-this-thing-on-04.yml @@ -26,9 +26,9 @@ criteria: topics: - "%(topic)s" # The topic of the message that triggered us. users: - - "%(msg.update.submitter)s" # The user that was created. + - "%(msg.update.user.name)s" # The user that was created. operation: count condition: greater than or equal to: 500 -recipient: "%(msg.update.submitter)s" +recipient: "%(msg.update.user.name)s" diff --git a/rules/is-this-thing-on-05.yml b/rules/is-this-thing-on-05.yml index 51e92e5..b8a2e70 100644 --- a/rules/is-this-thing-on-05.yml +++ b/rules/is-this-thing-on-05.yml @@ -26,9 +26,9 @@ criteria: topics: - "%(topic)s" # The topic of the message that triggered us. users: - - "%(msg.update.submitter)s" # The user that was created. + - "%(msg.update.user.name)s" # The user that was created. operation: count condition: greater than or equal to: 1000 -recipient: "%(msg.update.submitter)s" +recipient: "%(msg.update.user.name)s" diff --git a/rules/like-a-rock-01.yml b/rules/like-a-rock-01.yml index 1a7ee79..1350208 100644 --- a/rules/like-a-rock-01.yml +++ b/rules/like-a-rock-01.yml @@ -26,9 +26,9 @@ criteria: topics: - "%(topic)s" # The topic of the message that triggered us. users: - - "%(msg.update.submitter)s" # The user that was created. + - "%(msg.update.user.name)s" # The user that was created. operation: count condition: - greater than or equal to: 1 + greater than or equal to: 1 -recipient: "%(msg.update.submitter)s" +recipient: "%(msg.update.user.name)s" diff --git a/rules/like-a-rock-02.yml b/rules/like-a-rock-02.yml index c441bee..d1440c0 100644 --- a/rules/like-a-rock-02.yml +++ b/rules/like-a-rock-02.yml @@ -26,9 +26,9 @@ criteria: topics: - "%(topic)s" # The topic of the message that triggered us. users: - - "%(msg.update.submitter)s" # The user that was created. + - "%(msg.update.user.name)s" # The user that was created. operation: count condition: greater than or equal to: 20 -recipient: "%(msg.update.submitter)s" +recipient: "%(msg.update.user.name)s" diff --git a/rules/like-a-rock-03.yml b/rules/like-a-rock-03.yml index 5dd52f6..8f09c30 100644 --- a/rules/like-a-rock-03.yml +++ b/rules/like-a-rock-03.yml @@ -26,9 +26,9 @@ criteria: topics: - "%(topic)s" # The topic of the message that triggered us. users: - - "%(msg.update.submitter)s" # The user that was created. + - "%(msg.update.user.name)s" # The user that was created. operation: count condition: - greater than or equal to: 100 + greater than or equal to: 100 -recipient: "%(msg.update.submitter)s" +recipient: "%(msg.update.user.name)s" diff --git a/rules/like-a-rock-04.yml b/rules/like-a-rock-04.yml index b2b04a0..7f44c19 100644 --- a/rules/like-a-rock-04.yml +++ b/rules/like-a-rock-04.yml @@ -26,9 +26,9 @@ criteria: topics: - "%(topic)s" # The topic of the message that triggered us. users: - - "%(msg.update.submitter)s" # The user that was created. + - "%(msg.update.user.name)s" # The user that was created. operation: count condition: - greater than or equal to: 500 + greater than or equal to: 500 -recipient: "%(msg.update.submitter)s" +recipient: "%(msg.update.user.name)s" diff --git a/rules/like-a-rock-05.yml b/rules/like-a-rock-05.yml index b1dadf8..996ad5a 100644 --- a/rules/like-a-rock-05.yml +++ b/rules/like-a-rock-05.yml @@ -26,9 +26,9 @@ criteria: topics: - "%(topic)s" # The topic of the message that triggered us. users: - - "%(msg.update.submitter)s" # The user that was created. + - "%(msg.update.user.name)s" # The user that was created. operation: count condition: - greater than or equal to: 1000 + greater than or equal to: 1000 -recipient: "%(msg.update.submitter)s" +recipient: "%(msg.update.user.name)s"