From 569d84a75fd9ec61af3debd16256dbe98c4116bd Mon Sep 17 00:00:00 2001 From: Steven Smith Date: Wed, 26 Jun 2013 00:16:30 +0800 Subject: [PATCH 1/2] Update github.py --- plugins/github.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/github.py b/plugins/github.py index 671e80e..7aaee62 100644 --- a/plugins/github.py +++ b/plugins/github.py @@ -58,5 +58,5 @@ def ghissues(inp): user = data["user"]["login"] title = data["title"] summary = truncate(data["body"]) - gitiourl = gitio.gitio(data["url"]) + gitiourl = gitio.gitio(data["html_url"]) return fmt % (number, state, user, title, summary, gitiourl) From 4df5510281533c545b1d193f43df312302033f7a Mon Sep 17 00:00:00 2001 From: Steven Smith Date: Wed, 26 Jun 2013 00:21:28 +0800 Subject: [PATCH 2/2] Check if summary is null --- plugins/github.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/github.py b/plugins/github.py index 7aaee62..942b1ab 100644 --- a/plugins/github.py +++ b/plugins/github.py @@ -49,6 +49,7 @@ def ghissues(inp): except ValueError: return "Invalid data returned. Check arguments (.github issues username/repo [number]" fmt = "Issue: #%s (%s) by %s: %s | %s %s" # (number, state, user.login, title, truncate(body), gitio.gitio(data.url)) + fmt1 = "Issue: #%s (%s) by %s: %s %s" # (number, state, user.login, title, gitio.gitio(data.url)) number = data["number"] if data["state"] == "open": state = u"\x033\x02OPEN\x02\x0f" @@ -59,4 +60,7 @@ def ghissues(inp): title = data["title"] summary = truncate(data["body"]) gitiourl = gitio.gitio(data["html_url"]) - return fmt % (number, state, user, title, summary, gitiourl) + if summary == "": + return fmt1 % (number, state, user, title, gitiourl) + else: + return fmt % (number, state, user, title, summary, gitiourl)