From 29718b7a9c03c59987d19e327eef4947667cfef1 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Wed, 6 Nov 2013 06:21:02 +0800 Subject: [PATCH] Stop ignoring jenkins -1 votes One of the age calculations is the time patches have been up without any -1 or -2 votes. This calculation basically just doesn't reset the timer if a reviewer rebases their change, or fixes some things before anyone points it out. Originally I ignored jenkins here. It really wasn't a good idea. If jenkins gives a -1 vote, people are not likely to go review it, so those votes should be included here. Change-Id: Iec8deac21a2cfc07bf23e0d0d75e8ea0a27646af --- openreviews.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/openreviews.py b/openreviews.py index b850959..22cc051 100755 --- a/openreviews.py +++ b/openreviews.py @@ -139,8 +139,8 @@ def gen_stats(projects, waiting_on_reviewer, waiting_on_submitter, options): % (quartile_age(waiting_on_reviewer, quartile=3, key='age3')))) - stats.append(('Stats since the last revision without -1 or -2 ' - '(ignoring jenkins)', last_without_nack_stats)) + stats.append(('Stats since the last revision without -1 or -2 ', + last_without_nack_stats)) first_rev_stats = [] first_rev_stats.append(('Average wait time', '%s' @@ -169,8 +169,8 @@ def gen_stats(projects, waiting_on_reviewer, waiting_on_submitter, options): changes.append('%s %s (%s)' % (sec_to_period_string(change['age3']), format_url(change['url'], options), change['subject'])) - stats.append(('Longest waiting reviews (based on oldest rev without nack, ' - 'ignoring jenkins)', changes)) + stats.append(('Longest waiting reviews (based on oldest rev without -1 or' + ' -2)', changes)) changes = [] for change in age2_sorted[:options.longest_waiting]: @@ -245,8 +245,6 @@ def find_oldest_no_nack(change): for patch in reversed(change['patchSets']): nacked = False for review in patch.get('approvals', []): - if review['type'] != 'CRVW' and review['type'] != 'Code-Review': - continue if review['value'] in ('-1', '-2'): nacked = True break