From 66c199817a2f8992dcd2ea243d97eb14a914c755 Mon Sep 17 00:00:00 2001 From: Otto Urpelainen Date: Mar 23 2021 20:19:59 +0000 Subject: Retire Long Life to Pagure badges These badges do not work as they should for the following reasons: 1. If the message contains commits from multiple authors, commits count per author is not available. 2. Even if commit count per author was available, there is no way to evaluate the criteria separately for each author. 3. Rebasing in forks leads to the same commits being counted more than once, without the badge recipient actually doing anything themself. Item 1 could be solved by simple extension of schema so that Pagure would include the count per author. If it was the only problem, there would be no need to retire these rules. Item 2 has the worst effect by far. It has lead to many users having the highest level badge only because they happened to appear as an author in a message that also included a prominent committed. Fixing it would require extension of the rules language in fedbadges backend. It is unclear how difficult that would be. Item 3 would require more changes to messages emitted by Pagure. A way to distinguish between original work and it being reapplied by others would be needed. Perhaps comparing 'agent' and 'author' would work. But it is unclear if fedbadges backend allows such expressions. All in all, the rules for Pagure badges are specified in a way that is difficult to implement correctly. Since currently badges are awarded to users that have not earned them and nobody seems to be willing to put effort to fix the situation, it is the best to simply retire the rules. --- diff --git a/retired_rules/pagure-long-life-01.yml b/retired_rules/pagure-long-life-01.yml new file mode 100644 index 0000000..c3dc5e9 --- /dev/null +++ b/retired_rules/pagure-long-life-01.yml @@ -0,0 +1,40 @@ +%YAML 1.2 +--- +# Retired due to the following issues: +# 1. If the message contains commits from multiple authors, commits count per +# author is not available. +# 2. Even if commit count per author was available, there is no way to evaluate +# criteria separately for each author. +# 3. Synchronizing forks leads to the same commits being counted more than once + +# This is some metadata about the badge +name: Long Life to Pagure (Pagure I) +description: Pushed 1 commit to a Pagure repository. +creator: robyduck + +# This is a link to the discussion about adopting this as a for-real badge. +discussion: https://pagure.io/design/issue/434 + +# A link to the image for the badge +image_url: https://badges.fedoraproject.org/pngs/pagure-long-life-01.png +# 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: pagure.git.receive + +# Once the check has been triggered, this defines what we actually check. +criteria: + datanommer: + filter: + topics: + - "%(topic)s" # The topic of the message that triggered us. + users: + - "%(msg.authors)s" + operation: count + condition: + greater than or equal to: 1 + +recipient: "%(msg.authors)s" diff --git a/retired_rules/pagure-long-life-10.yml b/retired_rules/pagure-long-life-10.yml new file mode 100644 index 0000000..924746f --- /dev/null +++ b/retired_rules/pagure-long-life-10.yml @@ -0,0 +1,40 @@ +%YAML 1.2 +--- +# Retired due to the following issues: +# 1. If the message contains commits from multiple authors, commits count per +# author is not available. +# 2. Even if commit count per author was available, there is no way to evaluate +# criteria separately for each author. +# 3. Synchronizing forks leads to the same commits being counted more than once. + +# This is some metadata about the badge +name: Long Life to Pagure (Pagure II) +description: Pushed 10 commits to a Pagure repository. +creator: robyduck + +# This is a link to the discussion about adopting this as a for-real badge. +discussion: https://pagure.io/design/issue/434 + +# A link to the image for the badge +image_url: https://badges.fedoraproject.org/pngs/pagure-long-life-10.png +# 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: pagure.git.receive + +# Once the check has been triggered, this defines what we actually check. +criteria: + datanommer: + filter: + topics: + - "%(topic)s" # The topic of the message that triggered us. + users: + - "%(msg.authors)s" + operation: count + condition: + greater than or equal to: 10 + +recipient: "%(msg.authors)s" diff --git a/retired_rules/pagure-long-life-1000.yml b/retired_rules/pagure-long-life-1000.yml new file mode 100644 index 0000000..7e78497 --- /dev/null +++ b/retired_rules/pagure-long-life-1000.yml @@ -0,0 +1,40 @@ +%YAML 1.2 +--- +# Retired due to the following issues: +# 1. If the message contains commits from multiple authors, commits count per +# author is not available. +# 2. Even if commit count per author was available, there is no way to evaluate +# criteria separately for each author. +# 3. Synchronizing forks leads to the same commits being counted more than once. + +# This is some metadata about the badge +name: Long Life to Pagure (Pagure VI) +description: Pushed 1000 commits to a Pagure repository. Wow! That's a lot! +creator: robyduck + +# This is a link to the discussion about adopting this as a for-real badge. +discussion: https://pagure.io/design/issue/434 + +# A link to the image for the badge +image_url: https://badges.fedoraproject.org/pngs/pagure-long-life-1000.png +# 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: pagure.git.receive + +# Once the check has been triggered, this defines what we actually check. +criteria: + datanommer: + filter: + topics: + - "%(topic)s" # The topic of the message that triggered us. + users: + - "%(msg.authors)s" + operation: count + condition: + greater than or equal to: 1000 + +recipient: "%(msg.authors)s" diff --git a/retired_rules/pagure-long-life-150.yml b/retired_rules/pagure-long-life-150.yml new file mode 100644 index 0000000..332b3e5 --- /dev/null +++ b/retired_rules/pagure-long-life-150.yml @@ -0,0 +1,40 @@ +%YAML 1.2 +--- +# Retired due to the following issues: +# 1. If the message contains commits from multiple authors, commits count per +# author is not available. +# 2. Even if commit count per author was available, there is no way to evaluate +# criteria separately for each author. +# 3. Synchronizing forks leads to the same commits being counted more than once. + +# This is some metadata about the badge +name: Long Life to Pagure (Pagure IV) +description: Pushed 150 commits to a Pagure repository. +creator: robyduck + +# This is a link to the discussion about adopting this as a for-real badge. +discussion: https://pagure.io/design/issue/434 + +# A link to the image for the badge +image_url: https://badges.fedoraproject.org/pngs/pagure-long-life-150.png +# 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: pagure.git.receive + +# Once the check has been triggered, this defines what we actually check. +criteria: + datanommer: + filter: + topics: + - "%(topic)s" # The topic of the message that triggered us. + users: + - "%(msg.authors)s" + operation: count + condition: + greater than or equal to: 150 + +recipient: "%(msg.authors)s" diff --git a/retired_rules/pagure-long-life-50.yml b/retired_rules/pagure-long-life-50.yml new file mode 100644 index 0000000..4e5bb78 --- /dev/null +++ b/retired_rules/pagure-long-life-50.yml @@ -0,0 +1,40 @@ +%YAML 1.2 +--- +# Retired due to the following issues: +# 1. If the message contains commits from multiple authors, commits count per +# author is not available. +# 2. Even if commit count per author was available, there is no way to evaluate +# criteria separately for each author. +# 3. Synchronizing forks leads to the same commits being counted more than once. + +# This is some metadata about the badge +name: Long Life to Pagure (Pagure III) +description: Pushed 50 commits to a Pagure repository. +creator: robyduck + +# This is a link to the discussion about adopting this as a for-real badge. +discussion: https://pagure.io/design/issue/434 + +# A link to the image for the badge +image_url: https://badges.fedoraproject.org/pngs/pagure-long-life-50.png +# 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: pagure.git.receive + +# Once the check has been triggered, this defines what we actually check. +criteria: + datanommer: + filter: + topics: + - "%(topic)s" # The topic of the message that triggered us. + users: + - "%(msg.authors)s" + operation: count + condition: + greater than or equal to: 50 + +recipient: "%(msg.authors)s" diff --git a/retired_rules/pagure-long-life-500.yml b/retired_rules/pagure-long-life-500.yml new file mode 100644 index 0000000..2ab913d --- /dev/null +++ b/retired_rules/pagure-long-life-500.yml @@ -0,0 +1,40 @@ +%YAML 1.2 +--- +# Retired due to the following issues: +# 1. If the message contains commits from multiple authors, commits count per +# author is not available. +# 2. Even if commit count per author was available, there is no way to evaluate +# criteria separately for each author. +# 3. Synchronizing forks leads to the same commits being counted more than once. + +# This is some metadata about the badge +name: Long Life to Pagure (Pagure V) +description: Pushed 500 commits to a Pagure repository. +creator: robyduck + +# This is a link to the discussion about adopting this as a for-real badge. +discussion: https://pagure.io/design/issue/434 + +# A link to the image for the badge +image_url: https://badges.fedoraproject.org/pngs/pagure-long-life-500.png +# 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: pagure.git.receive + +# Once the check has been triggered, this defines what we actually check. +criteria: + datanommer: + filter: + topics: + - "%(topic)s" # The topic of the message that triggered us. + users: + - "%(msg.authors)s" + operation: count + condition: + greater than or equal to: 500 + +recipient: "%(msg.authors)s" diff --git a/rules/pagure-long-life-01.yml b/rules/pagure-long-life-01.yml deleted file mode 100644 index c8f8667..0000000 --- a/rules/pagure-long-life-01.yml +++ /dev/null @@ -1,34 +0,0 @@ -%YAML 1.2 ---- - -# This is some metadata about the badge -name: Long Life to Pagure (Pagure I) -description: Pushed 1 commit to a Pagure repository. -creator: robyduck - -# This is a link to the discussion about adopting this as a for-real badge. -discussion: https://pagure.io/design/issue/434 - -# A link to the image for the badge -image_url: https://badges.fedoraproject.org/pngs/pagure-long-life-01.png -# 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: pagure.git.receive - -# Once the check has been triggered, this defines what we actually check. -criteria: - datanommer: - filter: - topics: - - "%(topic)s" # The topic of the message that triggered us. - users: - - "%(msg.authors)s" - operation: count - condition: - greater than or equal to: 1 - -recipient: "%(msg.authors)s" diff --git a/rules/pagure-long-life-10.yml b/rules/pagure-long-life-10.yml deleted file mode 100644 index 53361d1..0000000 --- a/rules/pagure-long-life-10.yml +++ /dev/null @@ -1,34 +0,0 @@ -%YAML 1.2 ---- - -# This is some metadata about the badge -name: Long Life to Pagure (Pagure II) -description: Pushed 10 commits to a Pagure repository. -creator: robyduck - -# This is a link to the discussion about adopting this as a for-real badge. -discussion: https://pagure.io/design/issue/434 - -# A link to the image for the badge -image_url: https://badges.fedoraproject.org/pngs/pagure-long-life-10.png -# 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: pagure.git.receive - -# Once the check has been triggered, this defines what we actually check. -criteria: - datanommer: - filter: - topics: - - "%(topic)s" # The topic of the message that triggered us. - users: - - "%(msg.authors)s" - operation: count - condition: - greater than or equal to: 10 - -recipient: "%(msg.authors)s" diff --git a/rules/pagure-long-life-1000.yml b/rules/pagure-long-life-1000.yml deleted file mode 100644 index ae246f1..0000000 --- a/rules/pagure-long-life-1000.yml +++ /dev/null @@ -1,34 +0,0 @@ -%YAML 1.2 ---- - -# This is some metadata about the badge -name: Long Life to Pagure (Pagure VI) -description: Pushed 1000 commits to a Pagure repository. Wow! That's a lot! -creator: robyduck - -# This is a link to the discussion about adopting this as a for-real badge. -discussion: https://pagure.io/design/issue/434 - -# A link to the image for the badge -image_url: https://badges.fedoraproject.org/pngs/pagure-long-life-1000.png -# 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: pagure.git.receive - -# Once the check has been triggered, this defines what we actually check. -criteria: - datanommer: - filter: - topics: - - "%(topic)s" # The topic of the message that triggered us. - users: - - "%(msg.authors)s" - operation: count - condition: - greater than or equal to: 1000 - -recipient: "%(msg.authors)s" diff --git a/rules/pagure-long-life-150.yml b/rules/pagure-long-life-150.yml deleted file mode 100644 index 99e91dc..0000000 --- a/rules/pagure-long-life-150.yml +++ /dev/null @@ -1,34 +0,0 @@ -%YAML 1.2 ---- - -# This is some metadata about the badge -name: Long Life to Pagure (Pagure IV) -description: Pushed 150 commits to a Pagure repository. -creator: robyduck - -# This is a link to the discussion about adopting this as a for-real badge. -discussion: https://pagure.io/design/issue/434 - -# A link to the image for the badge -image_url: https://badges.fedoraproject.org/pngs/pagure-long-life-150.png -# 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: pagure.git.receive - -# Once the check has been triggered, this defines what we actually check. -criteria: - datanommer: - filter: - topics: - - "%(topic)s" # The topic of the message that triggered us. - users: - - "%(msg.authors)s" - operation: count - condition: - greater than or equal to: 150 - -recipient: "%(msg.authors)s" diff --git a/rules/pagure-long-life-50.yml b/rules/pagure-long-life-50.yml deleted file mode 100644 index b0a5133..0000000 --- a/rules/pagure-long-life-50.yml +++ /dev/null @@ -1,34 +0,0 @@ -%YAML 1.2 ---- - -# This is some metadata about the badge -name: Long Life to Pagure (Pagure III) -description: Pushed 50 commits to a Pagure repository. -creator: robyduck - -# This is a link to the discussion about adopting this as a for-real badge. -discussion: https://pagure.io/design/issue/434 - -# A link to the image for the badge -image_url: https://badges.fedoraproject.org/pngs/pagure-long-life-50.png -# 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: pagure.git.receive - -# Once the check has been triggered, this defines what we actually check. -criteria: - datanommer: - filter: - topics: - - "%(topic)s" # The topic of the message that triggered us. - users: - - "%(msg.authors)s" - operation: count - condition: - greater than or equal to: 50 - -recipient: "%(msg.authors)s" diff --git a/rules/pagure-long-life-500.yml b/rules/pagure-long-life-500.yml deleted file mode 100644 index 8f9fb79..0000000 --- a/rules/pagure-long-life-500.yml +++ /dev/null @@ -1,34 +0,0 @@ -%YAML 1.2 ---- - -# This is some metadata about the badge -name: Long Life to Pagure (Pagure V) -description: Pushed 500 commits to a Pagure repository. -creator: robyduck - -# This is a link to the discussion about adopting this as a for-real badge. -discussion: https://pagure.io/design/issue/434 - -# A link to the image for the badge -image_url: https://badges.fedoraproject.org/pngs/pagure-long-life-500.png -# 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: pagure.git.receive - -# Once the check has been triggered, this defines what we actually check. -criteria: - datanommer: - filter: - topics: - - "%(topic)s" # The topic of the message that triggered us. - users: - - "%(msg.authors)s" - operation: count - condition: - greater than or equal to: 500 - -recipient: "%(msg.authors)s"