Show issue/pr state in !ghissue and !ghpull (github.py)
This commit is contained in:
parent
d26a945c49
commit
8da6036894
1 changed files with 6 additions and 6 deletions
|
@ -64,9 +64,9 @@ class Module(ModuleManager.BaseModule):
|
||||||
labels = [label["name"] for label in page.data["labels"]]
|
labels = [label["name"] for label in page.data["labels"]]
|
||||||
url = self._short_url(page.data["html_url"])
|
url = self._short_url(page.data["html_url"])
|
||||||
|
|
||||||
event["stdout"].write("(%s/%s issue#%s) %s [%s] %s" % (
|
event["stdout"].write("(%s/%s issue#%s, %s) %s [%s] %s" % (
|
||||||
username, repository, number, page.data["title"],
|
username, repository, number, page.data["state"],
|
||||||
", ".join(labels), url))
|
page.data["title"], ", ".join(labels), url))
|
||||||
else:
|
else:
|
||||||
event["stderr"].write("Could not find issue")
|
event["stderr"].write("Could not find issue")
|
||||||
|
|
||||||
|
@ -86,9 +86,9 @@ class Module(ModuleManager.BaseModule):
|
||||||
url = self._short_url(page.data["html_url"])
|
url = self._short_url(page.data["html_url"])
|
||||||
|
|
||||||
event["stdout"].write(
|
event["stdout"].write(
|
||||||
"(%s/%s pull#%s) [%s/%s] %s→%s - %s %s" % (
|
"(%s/%s pull#%s, %s) [%s/%s] %s→%s - %s %s" % (
|
||||||
username, repository, number, added, removed,
|
username, repository, number, page.data["state"],
|
||||||
repo_from, repo_to, page.data["title"], url))
|
added, removed, repo_from, repo_to, page.data["title"], url))
|
||||||
else:
|
else:
|
||||||
event["stderr"].write("Could not find pull request")
|
event["stderr"].write("Could not find pull request")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue