Merge "update check-review-status to look for rejection by delegate"
This commit is contained in:
commit
0862559639
|
@ -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