Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_github.py

Issue 2548163002: Unbreak test-webkitpy. (Closed)
Patch Set: Added TODO and link to bug. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 import base64 5 import base64
6 import json 6 import json
7 import logging
8 import os
9 import sys
10
11 from webkitpy.common.system.filesystem import FileSystem
12 from webkitpy.common.webkit_finder import WebKitFinder
13
14 # httplib2 is part of the hermetic depot_tools install,
15 # but we first need to find a path to it.
16 # TODO(dglazkov): libhttp2 needs to be imported into thirdparty dir.
17 # See http://crbug.com/670987 for details.
18 _DEPOT_TOOLS_ROOT = WebKitFinder(FileSystem()).depot_tools_base()
19 sys.path.append(os.path.join(_DEPOT_TOOLS_ROOT, 'third_party'))
20
7 import httplib2 21 import httplib2
8 import logging
9 22
10 _log = logging.getLogger(__name__) 23 _log = logging.getLogger(__name__)
11 API_BASE = 'https://api.github.com' 24 API_BASE = 'https://api.github.com'
12 EXPORT_LABEL = 'chromium-export' 25 EXPORT_LABEL = 'chromium-export'
13 26
14 27
15 class WPTGitHub(object): 28 class WPTGitHub(object):
16 29
17 def __init__(self, host): 30 def __init__(self, host):
18 self.host = host 31 self.host = host
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 101
89 def merge_pull_request(self, pull_request_number): 102 def merge_pull_request(self, pull_request_number):
90 path = '/repos/w3c/web-platform-tests/pulls/%d/merge' % pull_request_num ber 103 path = '/repos/w3c/web-platform-tests/pulls/%d/merge' % pull_request_num ber
91 body = {} 104 body = {}
92 response, content = self.request(path, body) 105 response, content = self.request(path, body)
93 106
94 if response['status'] == '200': 107 if response['status'] == '200':
95 return json.loads(content) 108 return json.loads(content)
96 else: 109 else:
97 raise Exception('PR could not be merged: %d' % pull_request_number) 110 raise Exception('PR could not be merged: %d' % pull_request_number)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698