From 59c59f3dc6d64dd0563f8dfc15c9324d0738364b Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Fri, 14 Jun 2013 14:30:35 +0000 Subject: [PATCH] YAML for an "Involvement" badge. --- .../files/badges/involvement.yml | 35 +++++++++++++++++++ .../files/badges/test_badge.yml | 31 ---------------- 2 files changed, 35 insertions(+), 31 deletions(-) create mode 100644 roles/badges-backend/files/badges/involvement.yml delete mode 100644 roles/badges-backend/files/badges/test_badge.yml diff --git a/roles/badges-backend/files/badges/involvement.yml b/roles/badges-backend/files/badges/involvement.yml new file mode 100644 index 0000000000..28abdde1d0 --- /dev/null +++ b/roles/badges-backend/files/badges/involvement.yml @@ -0,0 +1,35 @@ +%YAML 1.2 +--- + +# This is some metadata about the badge +name: Involvement +description: You created an account in the Fedora Account System (FAS) +creator: ralph + +# This is a link to the discussion about adopting this as a for-real badge. +discussion: https://github.com/oddshocks/badges/blob/master/docs/badges.rst + +# A link to the image for the badge +image_url: http://upload.wikimedia.org/wikipedia/commons/5/53/PSM_V37_D209_Fisher_island_sound_rock_forming_natural_breakwater.jpg + +# That's us! +issuer_id: fedora-project + +# We'll perform our more costly check (defined below) only when +# we receive messages that match this 'trigger' +trigger: + topic: org.fedoraproject.stg.fas.user.create + +# Once the check has been triggered, this defines what we actually check. +criteria: + datanommer: + filter: + topics: + - "{topic}" # The topic of the message that triggered us. + usernames: + - "{msg.user}" # The user that was created. + operation: count + condition: + greater than or equal to: 1 + +recipient_key: "{msg.user}" diff --git a/roles/badges-backend/files/badges/test_badge.yml b/roles/badges-backend/files/badges/test_badge.yml deleted file mode 100644 index 3cd7b7b38a..0000000000 --- a/roles/badges-backend/files/badges/test_badge.yml +++ /dev/null @@ -1,31 +0,0 @@ -%YAML 1.2 ---- - -# This is some metadata about the badge -name: Something on your mind -description: You have commented on 2 or more bodhi updates. -creator: ralph - -# This is a link to the discussion about adopting this as a for-real badge. -discussion: http://github.com/fedora-infra/badges/pull/SOME_NUMBER - -# A link to the image for the badge -image_url: http://upload.wikimedia.org/wikipedia/commons/5/53/PSM_V37_D209_Fisher_island_sound_rock_forming_natural_breakwater.jpg - -# That's us! -issuer_id: fedora-project - -# We'll perform our more costly check (defined below) only when -# we receive messages that match this 'trigger' -trigger: - topic: org.fedoraproject.stg.bodhi.update.comment - -# Once the check has been triggered, this defines what we actually check. -criteria: - datanommer: - filter: - topics: - - "{topic}" # The topic of the message that triggered us. - operation: count - condition: - greater than or equal to: 2