update check-review-status to look for rejection by delegate
If the person to whom a decision has been delegated rejects it, report that the patch cannot be approved. Change-Id: I70f2ddf726f94fb6d11558510232cc5e96c4bbc5 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
parent
79772433e1
commit
11d0914c69
|
@ -138,6 +138,15 @@ def has_approved(name, review):
|
|||
return False
|
||||
|
||||
|
||||
def has_rejected(name, review):
|
||||
for vote in review['labels'].get('Code-Review', {}).get('all', []):
|
||||
voter = vote.get('name', '')
|
||||
value = vote.get('value', 0)
|
||||
if voter == name and value == -1:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def all_changes():
|
||||
offset = 0
|
||||
while True:
|
||||
|
@ -296,6 +305,8 @@ def get_one_status(change, delegates):
|
|||
can_approve = 'delegated to {}'.format(approver_name)
|
||||
if has_approved(approver_name, change):
|
||||
can_approve += ', YES'
|
||||
elif has_rejected(approver_name, change):
|
||||
can_approve += '\nNO - delegate voted against'
|
||||
|
||||
elif topic in ('project-update', 'new-project'):
|
||||
# https://governance.openstack.org/tc/reference/house-rules.html#other-project-team-updates
|
||||
|
|
Loading…
Reference in New Issue