Treat -2 as a negative approval for expirations.
* jeepyb/cmd/expire_old_reviews.py(main): Previously only reviews
with a -1 vote were expired, so those with a -2 and no -1 would
remain in review indefinitely. This corrects the script to also
treat -2 as a negative vote for purposes of auto-expiring a change.
Change-Id: Ia447d7b11abafd9b3bb7c7696a7f47ea51bacaa1
diff --git a/jeepyb/cmd/expire_old_reviews.py b/jeepyb/cmd/expire_old_reviews.py
index 9aaad0f..77f9856 100644
--- a/jeepyb/cmd/expire_old_reviews.py
+++ b/jeepyb/cmd/expire_old_reviews.py
@@ -75,7 +75,7 @@
if 'rowCount' not in row:
# Search for negative approvals
for approval in row['currentPatchSet']['approvals']:
- if approval['value'] == '-1':
+ if approval['value'] in ('-1', '-2'):
expire_patch_set(ssh,
row['currentPatchSet']['revision'],
row['subject'])