summaryrefslogtreecommitdiffstats
path: root/build-gluster-org/scripts/close-old-reviews.py
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2017-12-03 08:41:23 -0500
committerNigel Babu <nigelb@redhat.com>2017-12-04 13:45:00 +0530
commit5b1f454207bebb2b5683849eca5389c52f136728 (patch)
tree4110c7e817b4029bb9c3f71faffa31b6ee633831 /build-gluster-org/scripts/close-old-reviews.py
parent57ecdf37e8c84a33af21fe78ffefb222038e4376 (diff)
close-old-reviews: add url and subject in summary for easier identification
Change-Id: I34fdb009cbedd0d1ed1f7877732e4f4ad4671b7d Signed-off-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'build-gluster-org/scripts/close-old-reviews.py')
-rw-r--r--build-gluster-org/scripts/close-old-reviews.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/build-gluster-org/scripts/close-old-reviews.py b/build-gluster-org/scripts/close-old-reviews.py
index 5aa4635..eb99cd5 100644
--- a/build-gluster-org/scripts/close-old-reviews.py
+++ b/build-gluster-org/scripts/close-old-reviews.py
@@ -16,8 +16,7 @@ def get_change_ids(days=90, count=25):
'''
r = requests.get('https://review.gluster.org/changes/'
'?q=status:open+age:{}days+project:glusterfs'
- '&n={}'.format(days, count)
- )
+ '&n={}'.format(days, count))
output = r.text
cleaned_output = '\n'.join(output.split('\n')[1:])
parsed_output = json.loads(cleaned_output)
@@ -39,7 +38,10 @@ def close_reviews(change_ids):
}
username = os.environ.get('HTTP_USERNAME')
password = os.environ.get('HTTP_PASSWORD')
- print("Attempting to close review: ", change['_number'])
+ print("Attempting to close review: ", "https://review.gluster.org/",
+ change['_number'],
+ " -- Title: ",
+ change['subject'])
response = requests.post(url, auth=(username, password), json=data)
try:
response.raise_for_status()