| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Utility functions to communicate with Rietveld.""" | 5 """Utility functions to communicate with Rietveld.""" |
| 6 | 6 |
| 7 import collections | |
| 8 import json | 7 import json |
| 9 import logging | 8 import logging |
| 10 import urllib2 | 9 import urllib2 |
| 11 | 10 |
| 12 from webkitpy.common.net.buildbot import Build | 11 from webkitpy.common.net.buildbot import Build |
| 13 | 12 |
| 14 | 13 |
| 15 _log = logging.getLogger(__name__) | 14 _log = logging.getLogger(__name__) |
| 16 | 15 |
| 17 BASE_CODEREVIEW_URL = 'https://codereview.chromium.org/api' | 16 BASE_CODEREVIEW_URL = 'https://codereview.chromium.org/api' |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 )] | 101 )] |
| 103 | 102 |
| 104 | 103 |
| 105 def get_latest_try_job_results(issue_number, web): | 104 def get_latest_try_job_results(issue_number, web): |
| 106 url = _latest_patchset_url(issue_number, web) | 105 url = _latest_patchset_url(issue_number, web) |
| 107 patchset_data = _get_json(url, web) | 106 patchset_data = _get_json(url, web) |
| 108 results = {} | 107 results = {} |
| 109 for job in patchset_data['try_job_results']: | 108 for job in patchset_data['try_job_results']: |
| 110 results[job['builder']] = job['result'] | 109 results[job['builder']] = job['result'] |
| 111 return results | 110 return results |
| OLD | NEW |