| 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 |
| 7 import json | 8 import json |
| 8 import logging | 9 import logging |
| 9 import urllib2 | 10 import urllib2 |
| 10 | 11 |
| 11 from webkitpy.common.net.buildbot import Build | 12 from webkitpy.common.net.buildbot import Build |
| 12 | 13 |
| 13 | 14 |
| 14 _log = logging.getLogger(__name__) | 15 _log = logging.getLogger(__name__) |
| 15 | 16 |
| 16 BASE_CODEREVIEW_URL = 'https://codereview.chromium.org/api' | 17 BASE_CODEREVIEW_URL = 'https://codereview.chromium.org/api' |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 )] | 116 )] |
| 116 | 117 |
| 117 | 118 |
| 118 def get_latest_try_job_results(issue_number, web): | 119 def get_latest_try_job_results(issue_number, web): |
| 119 url = _latest_patchset_url(issue_number, web) | 120 url = _latest_patchset_url(issue_number, web) |
| 120 patchset_data = _get_json(url, web) | 121 patchset_data = _get_json(url, web) |
| 121 results = {} | 122 results = {} |
| 122 for job in patchset_data['try_job_results']: | 123 for job in patchset_data['try_job_results']: |
| 123 results[job['builder']] = job['result'] | 124 results[job['builder']] = job['result'] |
| 124 return results | 125 return results |
| OLD | NEW |