Improve diagnostics of upstreaming WPT changes.

This commit is contained in:
Josh Matthews 2017-10-06 18:28:46 -04:00
parent fc4de5adf5
commit 462c272380
2 changed files with 9 additions and 0 deletions

View file

@ -46,6 +46,7 @@ class GitHub(object):
if 200 <= resp.status_code < 300:
return resp.json()
else:
print resp.status_code, resp.json()
raise GitHubError(resp.status_code, resp.json())
def repo(self, owner, name):
@ -159,6 +160,13 @@ class Issue(object):
def path(self, suffix):
return urljoin(self.repo.path("issues/%i/" % self.number), suffix)
def add_label(self, label):
"""Add a label to the issue.
:param label: The name of the label
"""
self.repo.gh.post(self.path("labels"), [label])
def add_comment(self, message):
"""Add a comment to the issue