From ff342bc932fde65851266b0d9513452380c031e2 Mon Sep 17 00:00:00 2001 From: reality Date: Sat, 24 Jan 2015 17:34:30 +0000 Subject: [PATCH] [Close #634] --- modules/github/github.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/modules/github/github.js b/modules/github/github.js index e1a9b26..4bc4a72 100644 --- a/modules/github/github.js +++ b/modules/github/github.js @@ -46,14 +46,11 @@ var github = function(dbot) { } // TODO: move this shizz into an api call var longurl = "http://github.com/" + repo; - request({method: 'POST', uri: 'http://git.io', form:{url: longurl}}, function(error, response, body){ - event.reply(dbot.t('location')+" "+response.headers["location"]); - }); + event.reply(dbot.t('location')+" "+longurl); }); }, '~gstatus': function(event) { data = this.api.githubStatus(function(data){ - console.log(data); event.reply(dbot.t("status"+data["status"])); event.reply(data["body"]); }.bind(this)); @@ -87,10 +84,6 @@ var github = function(dbot) { bar += "]"; str += " is " + bar + progress + "% complete"; - var longurl = "http://github.com/" + repo + "/issues?milestone=" + milestone["number"]; - request({method: 'POST', uri: 'http://git.io', form:{url: longurl}}, function(error, response, body){ - event.reply(response.headers["location"]); - }); event.reply(str); break; } @@ -146,8 +139,7 @@ var github = function(dbot) { data = data[0]; } } - if (data["pull_request"]["html_url"]){ - console.log(data["pull_request"]["html_url"]); + if (_.has(data["pull_request"], "html_url")){ data["pull_request"] = " with code"; } else { data["pull_request"] = "";