summaryrefslogtreecommitdiffstats
path: root/build-gluster-org/scripts
diff options
context:
space:
mode:
authorNigel Babu <nigelb@redhat.com>2017-12-04 14:00:01 +0530
committerNigel Babu <nigelb@redhat.com>2017-12-04 14:00:01 +0530
commitb8019462f67541f1aee4949dcba8ed933a6c545d (patch)
tree627275c1aa001cd6922e8862509f9639222f72cd /build-gluster-org/scripts
parent5b1f454207bebb2b5683849eca5389c52f136728 (diff)
Revert to Deepshika's logic
This closes the oldest reviews first rather than newest reviews first Change-Id: I3d9e7a4cf6123379fcf6d1168fdbd759a00d7c3d
Diffstat (limited to 'build-gluster-org/scripts')
-rw-r--r--build-gluster-org/scripts/close-old-reviews.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/build-gluster-org/scripts/close-old-reviews.py b/build-gluster-org/scripts/close-old-reviews.py
index eb99cd5..cf131e1 100644
--- a/build-gluster-org/scripts/close-old-reviews.py
+++ b/build-gluster-org/scripts/close-old-reviews.py
@@ -15,11 +15,11 @@ def get_change_ids(days=90, count=25):
Get all the change IDs to close
'''
r = requests.get('https://review.gluster.org/changes/'
- '?q=status:open+age:{}days+project:glusterfs'
- '&n={}'.format(days, count))
+ '?q=status:open+age:{}days+'
+ 'project:glusterfs'.format(days))
output = r.text
cleaned_output = '\n'.join(output.split('\n')[1:])
- parsed_output = json.loads(cleaned_output)
+ parsed_output = json.loads(cleaned_output)[-int(count):]
return parsed_output