From 3b069f53e59a9550eebde007f1b34c8a26e53ab0 Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Mon, 17 Jun 2013 18:29:17 +0000 Subject: [PATCH] Pull badge rule definitions from the other repo. --- .../files/badges/associate-editor.yml | 33 ----------------- .../files/badges/if-you-build-it.yml | 37 ------------------- .../files/badges/involvement.yml | 35 ------------------ .../files/badges/is-this-thing-on.yml | 35 ------------------ .../files/badges/junior-editor.yml | 33 ----------------- .../files/badges/like-a-rock.yml | 35 ------------------ .../files/badges/master-editor.yml | 33 ----------------- .../files/badges/proven-packager.yml | 37 ------------------- .../files/badges/proven-tester.yml | 37 ------------------- roles/badges-backend/files/badges/scm.yml | 33 ----------------- .../files/badges/secretary-general.yml | 33 ----------------- .../files/badges/senior-editor.yml | 33 ----------------- roles/badges-backend/files/badges/sponsor.yml | 37 ------------------- .../files/badges/what-goes-up.yml | 37 ------------------- roles/badges-backend/tasks/main.yml | 2 +- 15 files changed, 1 insertion(+), 489 deletions(-) delete mode 100644 roles/badges-backend/files/badges/associate-editor.yml delete mode 100644 roles/badges-backend/files/badges/if-you-build-it.yml delete mode 100644 roles/badges-backend/files/badges/involvement.yml delete mode 100644 roles/badges-backend/files/badges/is-this-thing-on.yml delete mode 100644 roles/badges-backend/files/badges/junior-editor.yml delete mode 100644 roles/badges-backend/files/badges/like-a-rock.yml delete mode 100644 roles/badges-backend/files/badges/master-editor.yml delete mode 100644 roles/badges-backend/files/badges/proven-packager.yml delete mode 100644 roles/badges-backend/files/badges/proven-tester.yml delete mode 100644 roles/badges-backend/files/badges/scm.yml delete mode 100644 roles/badges-backend/files/badges/secretary-general.yml delete mode 100644 roles/badges-backend/files/badges/senior-editor.yml delete mode 100644 roles/badges-backend/files/badges/sponsor.yml delete mode 100644 roles/badges-backend/files/badges/what-goes-up.yml diff --git a/roles/badges-backend/files/badges/associate-editor.yml b/roles/badges-backend/files/badges/associate-editor.yml deleted file mode 100644 index 4f91642a54..0000000000 --- a/roles/badges-backend/files/badges/associate-editor.yml +++ /dev/null @@ -1,33 +0,0 @@ -%YAML 1.2 ---- - -# This is some metadata about the badge -name: Associate Editor -description: Edited at least 20 wiki pages. -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: wiki.article.edit - -# 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}" - operation: count - condition: - greater than or equal to: 20 diff --git a/roles/badges-backend/files/badges/if-you-build-it.yml b/roles/badges-backend/files/badges/if-you-build-it.yml deleted file mode 100644 index 790b0e0558..0000000000 --- a/roles/badges-backend/files/badges/if-you-build-it.yml +++ /dev/null @@ -1,37 +0,0 @@ -%YAML 1.2 ---- - -# This is some metadata about the badge -name: If you build it... -description: Succesfully completed a koji build. -creator: ralph - -# This is a link to the discussion about adopting this as a for-real badge. -discussion: https://github.com/oddshocks/badges/pull/2 - -# 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: - all: - - topic: buildsys.build.state.change - - lambda: msg.get('msg', {}).get('new', None) is 1 - -# 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.owner}" # The user that was created. - operation: count - condition: - greater than or equal to: 1 - -recipient_key: "{msg.owner}" diff --git a/roles/badges-backend/files/badges/involvement.yml b/roles/badges-backend/files/badges/involvement.yml deleted file mode 100644 index 5dcbbfdba8..0000000000 --- a/roles/badges-backend/files/badges/involvement.yml +++ /dev/null @@ -1,35 +0,0 @@ -%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: 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/is-this-thing-on.yml b/roles/badges-backend/files/badges/is-this-thing-on.yml deleted file mode 100644 index 0789fb899a..0000000000 --- a/roles/badges-backend/files/badges/is-this-thing-on.yml +++ /dev/null @@ -1,35 +0,0 @@ -%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/junior-editor.yml b/roles/badges-backend/files/badges/junior-editor.yml deleted file mode 100644 index 3c60a5f3b8..0000000000 --- a/roles/badges-backend/files/badges/junior-editor.yml +++ /dev/null @@ -1,33 +0,0 @@ -%YAML 1.2 ---- - -# This is some metadata about the badge -name: Junior Editor -description: Edited at least 10 wiki pages. -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: wiki.article.edit - -# 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}" - operation: count - condition: - greater than or equal to: 10 diff --git a/roles/badges-backend/files/badges/like-a-rock.yml b/roles/badges-backend/files/badges/like-a-rock.yml deleted file mode 100644 index cd8beb76b3..0000000000 --- a/roles/badges-backend/files/badges/like-a-rock.yml +++ /dev/null @@ -1,35 +0,0 @@ -%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}" diff --git a/roles/badges-backend/files/badges/master-editor.yml b/roles/badges-backend/files/badges/master-editor.yml deleted file mode 100644 index 44839b0e4e..0000000000 --- a/roles/badges-backend/files/badges/master-editor.yml +++ /dev/null @@ -1,33 +0,0 @@ -%YAML 1.2 ---- - -# This is some metadata about the badge -name: Master Editor -description: Edited at least 100 wiki pages. -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: wiki.article.edit - -# 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}" - operation: count - condition: - greater than or equal to: 100 diff --git a/roles/badges-backend/files/badges/proven-packager.yml b/roles/badges-backend/files/badges/proven-packager.yml deleted file mode 100644 index 756d8271e9..0000000000 --- a/roles/badges-backend/files/badges/proven-packager.yml +++ /dev/null @@ -1,37 +0,0 @@ -%YAML 1.2 ---- - -# This is some metadata about the badge -name: Proven Packager -description: Became a member of the provenpackager group. -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: - all: - - topic: fas.group.member.sponsor - - lambda: msg.get('msg', {}).get('group', {}).get('username', None) == 'provenpackager' - -# 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.username}" - operation: count - condition: - greater than or equal to: 1 - -recipient_key: "{msg.user.username}" diff --git a/roles/badges-backend/files/badges/proven-tester.yml b/roles/badges-backend/files/badges/proven-tester.yml deleted file mode 100644 index bcea20fe48..0000000000 --- a/roles/badges-backend/files/badges/proven-tester.yml +++ /dev/null @@ -1,37 +0,0 @@ -%YAML 1.2 ---- - -# This is some metadata about the badge -name: Proven Tester -description: Became a member of the proventester group. -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: - all: - - topic: fas.group.member.sponsor - - lambda: msg.get('msg', {}).get('group', {}).get('username', None) == 'proventester' - -# 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.username}" - operation: count - condition: - greater than or equal to: 1 - -recipient_key: "{msg.user.username}" diff --git a/roles/badges-backend/files/badges/scm.yml b/roles/badges-backend/files/badges/scm.yml deleted file mode 100644 index ea2398c810..0000000000 --- a/roles/badges-backend/files/badges/scm.yml +++ /dev/null @@ -1,33 +0,0 @@ -%YAML 1.2 ---- - -# This is some metadata about the badge -name: SCM -description: Pushed a commit to a Fedora package repository. -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: git.receive - -# 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.commit.username}" - operation: count - condition: - greater than or equal to: 1 diff --git a/roles/badges-backend/files/badges/secretary-general.yml b/roles/badges-backend/files/badges/secretary-general.yml deleted file mode 100644 index 2684b258e9..0000000000 --- a/roles/badges-backend/files/badges/secretary-general.yml +++ /dev/null @@ -1,33 +0,0 @@ -%YAML 1.2 ---- - -# This is some metadata about the badge -name: Secretary General -description: Chaired an IRC meeting. -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: meetbot.meeting.complete - -# 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: 1 - -recipient_key: "{msg.chairs}" diff --git a/roles/badges-backend/files/badges/senior-editor.yml b/roles/badges-backend/files/badges/senior-editor.yml deleted file mode 100644 index 7ae34a7db4..0000000000 --- a/roles/badges-backend/files/badges/senior-editor.yml +++ /dev/null @@ -1,33 +0,0 @@ -%YAML 1.2 ---- - -# This is some metadata about the badge -name: Senior Editor -description: Edited at least 50 wiki pages. -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: wiki.article.edit - -# 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}" - operation: count - condition: - greater than or equal to: 50 diff --git a/roles/badges-backend/files/badges/sponsor.yml b/roles/badges-backend/files/badges/sponsor.yml deleted file mode 100644 index 82964b7006..0000000000 --- a/roles/badges-backend/files/badges/sponsor.yml +++ /dev/null @@ -1,37 +0,0 @@ -%YAML 1.2 ---- - -# This is some metadata about the badge -name: Sponsor -description: Became a member of the sponsor group. -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: - all: - - topic: fas.group.member.sponsor - - lambda: msg.get('msg', {}).get('group', {}).get('username', None) == 'sponsor' - -# 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.username}" - operation: count - condition: - greater than or equal to: 1 - -recipient_key: "{msg.user.username}" diff --git a/roles/badges-backend/files/badges/what-goes-up.yml b/roles/badges-backend/files/badges/what-goes-up.yml deleted file mode 100644 index 274c061fde..0000000000 --- a/roles/badges-backend/files/badges/what-goes-up.yml +++ /dev/null @@ -1,37 +0,0 @@ -%YAML 1.2 ---- - -# This is some metadata about the badge -name: What goes up... -description: Submitted a koji build that failed to build. -creator: ralph - -# This is a link to the discussion about adopting this as a for-real badge. -discussion: https://github.com/oddshocks/badges/pull/2 - -# 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: - all: - - topic: buildsys.build.state.change - - lambda: msg.get('msg', {}).get('new', None) is 3 - -# 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.owner}" # The user that was created. - operation: count - condition: - greater than or equal to: 1 - -recipient_key: "{msg.owner}" diff --git a/roles/badges-backend/tasks/main.yml b/roles/badges-backend/tasks/main.yml index 10bd2c8426..60ab03a180 100644 --- a/roles/badges-backend/tasks/main.yml +++ b/roles/badges-backend/tasks/main.yml @@ -35,7 +35,7 @@ dest=/usr/share/badges/rules/ owner=fedmsg group=fedmsg mode=0644 with_fileglob: - - badges/*.yml + - /srv/web/infra/badges/rules/*.yml tags: - config notify: