From b8019462f67541f1aee4949dcba8ed933a6c545d Mon Sep 17 00:00:00 2001 From: Nigel Babu Date: Mon, 4 Dec 2017 14:00:01 +0530 Subject: Revert to Deepshika's logic This closes the oldest reviews first rather than newest reviews first Change-Id: I3d9e7a4cf6123379fcf6d1168fdbd759a00d7c3d --- build-gluster-org/scripts/close-old-reviews.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'build-gluster-org/scripts/close-old-reviews.py') 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 -- cgit