[bugzilla-gnome-org-customizations/production] Make Spammers' life a bit harder



commit b41517b2c1b001c869f4e36b6a7e1986b6f4bb7d
Author: Andre Klapper <a9016009 gmx de>
Date:   Tue Nov 29 01:21:34 2016 +0100

    Make Spammers' life a bit harder

 extensions/GNOME/Extension.pm |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/extensions/GNOME/Extension.pm b/extensions/GNOME/Extension.pm
index 10d6312..4ee55cc 100644
--- a/extensions/GNOME/Extension.pm
+++ b/extensions/GNOME/Extension.pm
@@ -310,6 +310,23 @@ sub _createGitCommitLink {
    my $productname = $args->{'bug'}->product;
    my $commit_link = join("", $1, '<a href="https://git.gnome.org/browse/', url_quote($productname), 
'/commit/?id=', $2, '">', $2, '</a>');
    return $commit_link;
+}
+
+sub bug_end_of_create_validators {
+    my ($self, $args) = @_;
+    my $params = $args->{params};
+    my $short_desc = $params->{short_desc};
+    my $bug_status = $params->{bug_status};
+    my @spamwords = qw( quickbooks QuickBooks 18003819788 1800-381-9788 18883142450 844.307.5701 
844-775-6411 solarcity -phone-number- );
+    foreach my $spamword (@spamwords) {
+        if (index($short_desc, $spamword) != -1) {
+            print "Spam summary: $spamword\n";
+#           $params->{short_desc} = "Spam";
+#           $params->{bug_status} = "RESOLVED";
+#           $params->{resolution} = "INVALID";
+            $params->{alias} = "spam";
+        }
+    }
 };
 
 __PACKAGE__->NAME;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]