#691 Bodhi 4.0 introduce a new message schema for updates.
Closed 4 years ago by cverna. Opened 4 years ago by cverna.
cverna/fedora-badges fix_bodhi_update_messages  into  master

file modified
+3 -3
@@ -32,9 +32,9 @@ 

          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"

file modified
+3 -3
@@ -27,9 +27,9 @@ 

          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"

file modified
+2 -2
@@ -21,9 +21,9 @@ 

          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"

file modified
+3 -3
@@ -23,9 +23,9 @@ 

          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"

file modified
+2 -2
@@ -23,11 +23,11 @@ 

          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"

file modified
+2 -2
@@ -23,11 +23,11 @@ 

          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"

@@ -26,9 +26,9 @@ 

          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"

@@ -26,9 +26,9 @@ 

          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"

@@ -26,9 +26,9 @@ 

          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"

@@ -26,9 +26,9 @@ 

          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"

@@ -26,9 +26,9 @@ 

          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"

file modified
+3 -3
@@ -26,9 +26,9 @@ 

          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"

file modified
+2 -2
@@ -26,9 +26,9 @@ 

          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"

file modified
+3 -3
@@ -26,9 +26,9 @@ 

          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"

file modified
+3 -3
@@ -26,9 +26,9 @@ 

          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"

file modified
+3 -3
@@ -26,9 +26,9 @@ 

          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"

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 cverna@tutanota.com

how do the conditions work in order to sum up the old and the new messages?

how do the conditions work in order to sum up the old and the new messages?

Haha good question :S. I am not sure I will have much time to look at that soon. Maybe @sayanchowdhury have a better idea of how this part of fedbadges works.

Pull-Request has been closed by cverna

4 years ago