Re: [PATCH] Add mark_spam.py script

2016-08-16 Thread Martin Liška
On 08/16/2016 12:02 AM, Joseph Myers wrote: > On Mon, 15 Aug 2016, Martin Liška wrote: > >> It can, currently we mark as spam just the first comment. If there's a spam >> PR >> which contains multiple comments, I'll extend the script. > > There certainly are spam bugs where the spammer pasted

Re: [PATCH] Add mark_spam.py script

2016-08-15 Thread Joseph Myers
On Mon, 15 Aug 2016, Martin Liška wrote: > It can, currently we mark as spam just the first comment. If there's a spam PR > which contains multiple comments, I'll extend the script. There certainly are spam bugs where the spammer pasted their spam in a comment after creating the bug, rather

Re: [PATCH] Add mark_spam.py script

2016-08-15 Thread Martin Liška
On 08/15/2016 11:48 AM, Jakub Jelinek wrote: > But can't the comment added for the attachment contain also some spam text > that should be sanitized? > > Jakub It can, currently we mark as spam just the first comment. If there's a spam PR which contains multiple comments, I'll extend the

Re: [PATCH] Add mark_spam.py script

2016-08-15 Thread Jakub Jelinek
On Mon, Aug 15, 2016 at 11:43:11AM +0200, Martin Liška wrote: > > Is dropping of 'comment": 'spam' intentional? > > Yes, it's not necessary to do a comment about the change for an attachment. > As the name of the attachment is set to spam, it's obvious in a comment > that is made for that. But

Re: [PATCH] Add mark_spam.py script

2016-08-15 Thread Martin Liška
On 08/15/2016 11:37 AM, Jakub Jelinek wrote: > On Mon, Aug 15, 2016 at 11:31:22AM +0200, Martin Liška wrote: >> diff --git a/contrib/mark_spam.py b/contrib/mark_spam.py >> index 569a03d..f206356 100755 >> --- a/contrib/mark_spam.py >> +++ b/contrib/mark_spam.py >> @@ -34,6 +34,10 @@ def

Re: [PATCH] Add mark_spam.py script

2016-08-15 Thread Jakub Jelinek
On Mon, Aug 15, 2016 at 11:31:22AM +0200, Martin Liška wrote: > diff --git a/contrib/mark_spam.py b/contrib/mark_spam.py > index 569a03d..f206356 100755 > --- a/contrib/mark_spam.py > +++ b/contrib/mark_spam.py > @@ -34,6 +34,10 @@ def mark_as_spam(id, api_key, verbose): > r = requests.get(u)

Re: [PATCH] Add mark_spam.py script

2016-08-15 Thread Martin Liška
This is version of the script I've just installed as r239467. Martin >From 6385fc5c8729dcabd791c5b0cc5ba2ff64e68489 Mon Sep 17 00:00:00 2001 From: marxin Date: Mon, 15 Aug 2016 11:28:35 +0200 Subject: [PATCH] Enhance mark_spam.py script contrib/ChangeLog: 2016-08-15 Martin

Re: [PATCH] Add mark_spam.py script

2016-08-13 Thread Martin Liška
On 08/12/2016 11:15 PM, Joseph Myers wrote: Next observation on this script: it dies if a bug number in the given range doesn't exist, with an error like: Marking as spam: PR75336 Traceback (most recent call last): File "./mark_spam.py", line 98, in mark_as_spam(id, args.api_key,

Re: [PATCH] Add mark_spam.py script

2016-08-12 Thread Joseph Myers
Next observation on this script: it dies if a bug number in the given range doesn't exist, with an error like: Marking as spam: PR75336 Traceback (most recent call last): File "./mark_spam.py", line 98, in mark_as_spam(id, args.api_key, args.verbose) File "./mark_spam.py", line 38, in

Re: [PATCH] Add mark_spam.py script

2016-08-12 Thread Martin Liška
On 08/12/2016 06:10 PM, Joseph Myers wrote: > On Wed, 10 Aug 2016, Martin Liška wrote: > >> On 08/10/2016 10:49 PM, Joseph Myers wrote: >>> The latest spam bugs have spam attachments as well. I'm not sure if the >>> API can delete attachments, but it would be helpful for the script to do >>> as

Re: [PATCH] Add mark_spam.py script

2016-08-12 Thread Joseph Myers
On Wed, 10 Aug 2016, Martin Liška wrote: > On 08/10/2016 10:49 PM, Joseph Myers wrote: > > The latest spam bugs have spam attachments as well. I'm not sure if the > > API can delete attachments, but it would be helpful for the script to do > > as much as possible with them (change filenames,

Re: [PATCH] Add mark_spam.py script

2016-08-10 Thread Martin Liška
On 08/10/2016 10:49 PM, Joseph Myers wrote: The latest spam bugs have spam attachments as well. I'm not sure if the API can delete attachments, but it would be helpful for the script to do as much as possible with them (change filenames, descriptions, MIME types, mark them as obsolete). I'm

Re: [PATCH] Add mark_spam.py script

2016-08-10 Thread Joseph Myers
The latest spam bugs have spam attachments as well. I'm not sure if the API can delete attachments, but it would be helpful for the script to do as much as possible with them (change filenames, descriptions, MIME types, mark them as obsolete). -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH] Add mark_spam.py script

2016-07-27 Thread Jeff Law
On 07/26/2016 06:39 AM, Martin Liška wrote: Hello. This is python script that utilizes bugzilla API and marks PRs as spam: $ ./mark_spam.py --help usage: mark_spam.py [-h] [--verbose] api_key range Mark Bugzilla issues as spam. positional arguments: api_key API key range Range