Chromium Code Reviews| Index: presubmit_support.py |
| diff --git a/presubmit_support.py b/presubmit_support.py |
| index 0e85eb0b7a622c9a6e7d0f0d3c71dec75f9016de..9cafa0fd23c29fe814c76e1dc163b3f24cb8fced 100755 |
| --- a/presubmit_support.py |
| +++ b/presubmit_support.py |
| @@ -244,13 +244,11 @@ class GerritAccessor(object): |
| return self.GetChangeInfo(issue)['owner']['email'] |
| def GetChangeReviewers(self, issue, approving_only=True): |
| - # Gerrit has 'approved' sub-section, but it only lists 1 approver. |
| - # So, if we look only for approvers, we have to look at all anyway. |
| - # Also, assume LGTM means Code-Review label == 2. Other configurations |
| - # aren't supported. |
| + cr = self.GetChangeInfo(issue)['labels']['Code-Review'] |
| + max_value = max(int(k) for k in cr['values'].keys()) |
| return [r['email'] |
| for r in self.GetChangeInfo(issue)['labels']['Code-Review']['all'] |
|
martiniss
2016/07/22 21:41:16
Use cr here?
agable
2016/07/22 21:43:40
Right, fixed.
|
| - if not approving_only or '2' == str(r.get('value', 0))] |
| + if not approving_only or r.get('value', 0) == max_value] |
| class OutputApi(object): |