diff options
author | marxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-08-11 13:40:37 +0000 |
---|---|---|
committer | marxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-08-11 13:40:37 +0000 |
commit | f0f80cfada902cf5c0214b58213c26637d604090 (patch) | |
tree | 61286bc50375e7a72fd6e65164bf51c0c8037a8b /contrib | |
parent | 403959836ee426080372f4a1981e8535927a9e66 (diff) | |
download | gcc-f0f80cfada902cf5c0214b58213c26637d604090.tar.gz |
mark_spam.py: mark attachments as obsolete and rename them
* mark_spam.py: Mark attachments as obsolete and rename them.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239368 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/ChangeLog | 4 | ||||
-rwxr-xr-x | contrib/mark_spam.py | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/contrib/ChangeLog b/contrib/ChangeLog index 927d72c911c..6e1a0fc2d7b 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -1,3 +1,7 @@ +2016-08-11 Martin Liska <mliska@suse.cz> + + * mark_spam.py: Mark attachments as obsolete and rename them. + 2016-08-03 Eric Gallager <egall@gwmail.gwu.edu> * download_prerequisites: Explicitly remove existing symlinks diff --git a/contrib/mark_spam.py b/contrib/mark_spam.py index cc394dcb742..569a03dd9a7 100755 --- a/contrib/mark_spam.py +++ b/contrib/mark_spam.py @@ -67,6 +67,18 @@ def mark_as_spam(id, api_key, verbose): print(r) print(r.text) + # 4) mark all attachments as spam + r = requests.get(u + '/attachment') + response = json.loads(r.text) + attachments = response['bugs'][str(id)] + for a in attachments: + attachment_id = a['id'] + url = '%sbug/attachment/%d' % (base_url, attachment_id) + r = requests.put(url, json = {'ids': [attachment_id], 'summary': 'spam', 'comment': 'spam', 'is_obsolete': True, 'api_key': api_key}) + if verbose: + print(r) + print(r.text) + parser = argparse.ArgumentParser(description='Mark Bugzilla issues as spam.') parser.add_argument('api_key', help = 'API key') parser.add_argument('range', help = 'Range of IDs, e.g. 10-23,24,25,27') |