aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGravatar jesopo2019-03-02 08:29:45 +0000
committerGravatar jesopo2019-03-02 08:29:45 +0000
commit7c63dbcf009f1e626309b6ab158d42ec08c386f7 (patch)
treea20e8d75ee0fc152255286a6e73cbc1f6ce59fe6 /modules
parentMove HTTPWrongContentTypeException catch above Exception catch (diff)
signature
Tweak !ghpull format/colours
Diffstat (limited to 'modules')
-rw-r--r--modules/github/__init__.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/modules/github/__init__.py b/modules/github/__init__.py
index c36f230b..c13514d8 100644
--- a/modules/github/__init__.py
+++ b/modules/github/__init__.py
@@ -135,16 +135,17 @@ class Module(ModuleManager.BaseModule):
event["stderr"].write("Could not find issue")
def _gh_pull(self, event, page, username, repository, number):
- repo_from = page.data["head"]["label"]
- repo_to = page.data["base"]["label"]
+ repo = utils.irc.color("%s/%s" % (username, repository), COLOR_REPO)
+ branch_from = page.data["head"]["label"]
+ branch_to = page.data["base"]["label"]
added = self._added(page.data["additions"])
removed = self._removed(page.data["deletions"])
url = self._short_url(page.data["html_url"])
event["stdout"].write(
- "(%s/%s pull#%s, %s) [%s/%s] %s → %s - %s %s" % (
- username, repository, number, page.data["state"],
- added, removed, repo_from, repo_to, page.data["title"], url))
+ "(%s pull#%s, %s) %s → %s [%s/%s] - %s %s" % (
+ repo, number, page.data["state"], branch_from, branch_to,
+ added, removed, page.data["title"], url))
def _gh_get_pull(self, username, repository, number):
return utils.http.request(
API_PULL_URL % (username, repository, number),