From 7712fba9cab81c189196ec7d58139b902be525f6 Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Fri, 14 Jun 2013 14:45:25 +0000 Subject: [PATCH] Two simple bodhi badges. --- .../files/badges/is-this-thing-on.yml | 35 +++++++++++++++++++ .../files/badges/like-a-rock.yml | 35 +++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 roles/badges-backend/files/badges/is-this-thing-on.yml create mode 100644 roles/badges-backend/files/badges/like-a-rock.yml diff --git a/roles/badges-backend/files/badges/is-this-thing-on.yml b/roles/badges-backend/files/badges/is-this-thing-on.yml new file mode 100644 index 0000000000..0789fb899a --- /dev/null +++ b/roles/badges-backend/files/badges/is-this-thing-on.yml @@ -0,0 +1,35 @@ +%YAML 1.2 +--- + +# This is some metadata about the badge +name: Is this thing on? +description: You pushed your first bodhi update to the testing repositories. +creator: ralph + +# This is a link to the discussion about adopting this as a for-real badge. +discussion: https://github.com/oddshocks/badges/pull/3 + +# 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: bodhi.update.request.testing + +# 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.update.submitter}" # The user that was created. + operation: count + condition: + greater than or equal to: 1 + +recipient_key: "{msg.update.submitter}" diff --git a/roles/badges-backend/files/badges/like-a-rock.yml b/roles/badges-backend/files/badges/like-a-rock.yml new file mode 100644 index 0000000000..cd8beb76b3 --- /dev/null +++ b/roles/badges-backend/files/badges/like-a-rock.yml @@ -0,0 +1,35 @@ +%YAML 1.2 +--- + +# This is some metadata about the badge +name: Like a Rock +description: You pushed your first bodhi update to the stable repositories. +creator: ralph + +# This is a link to the discussion about adopting this as a for-real badge. +discussion: https://github.com/oddshocks/badges/pull/3 + +# 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: bodhi.update.request.stable + +# 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.update.submitter}" # The user that was created. + operation: count + condition: + greater than or equal to: 1 + +recipient_key: "{msg.update.submitter}"