mirror of
https://github.com/servo/servo.git
synced 2025-07-12 09:53:40 +01:00
Improve diagnostics of upstreaming WPT changes.
This commit is contained in:
parent
fc4de5adf5
commit
462c272380
2 changed files with 9 additions and 0 deletions
|
@ -46,6 +46,7 @@ class GitHub(object):
|
||||||
if 200 <= resp.status_code < 300:
|
if 200 <= resp.status_code < 300:
|
||||||
return resp.json()
|
return resp.json()
|
||||||
else:
|
else:
|
||||||
|
print resp.status_code, resp.json()
|
||||||
raise GitHubError(resp.status_code, resp.json())
|
raise GitHubError(resp.status_code, resp.json())
|
||||||
|
|
||||||
def repo(self, owner, name):
|
def repo(self, owner, name):
|
||||||
|
@ -159,6 +160,13 @@ class Issue(object):
|
||||||
def path(self, suffix):
|
def path(self, suffix):
|
||||||
return urljoin(self.repo.path("issues/%i/" % self.number), 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):
|
def add_comment(self, message):
|
||||||
"""Add a comment to the issue
|
"""Add a comment to the issue
|
||||||
|
|
||||||
|
|
|
@ -339,6 +339,7 @@ class PRAddComment(Step):
|
||||||
"""Add an issue comment indicating that the code has been reviewed already"""
|
"""Add an issue comment indicating that the code has been reviewed already"""
|
||||||
def create(self, state):
|
def create(self, state):
|
||||||
state.pr.issue.add_comment("Code reviewed upstream.")
|
state.pr.issue.add_comment("Code reviewed upstream.")
|
||||||
|
state.pr.issue.add_label("servo-export")
|
||||||
|
|
||||||
|
|
||||||
class MergePR(Step):
|
class MergePR(Step):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue