diff options
author | Nigel Babu <nigelb@redhat.com> | 2017-12-04 14:00:01 +0530 |
---|---|---|
committer | Nigel Babu <nigelb@redhat.com> | 2017-12-04 14:00:01 +0530 |
commit | b8019462f67541f1aee4949dcba8ed933a6c545d (patch) | |
tree | 627275c1aa001cd6922e8862509f9639222f72cd /build-gluster-org/scripts | |
parent | 5b1f454207bebb2b5683849eca5389c52f136728 (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.py | 6 |
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 |