From ac19564a0fd57464f9428bba55786b4e4b86c7c4 Mon Sep 17 00:00:00 2001 From: avyaznikov Date: Wed, 25 Jan 2012 15:47:44 +0400 Subject: [PATCH 1/2] new gh-issue fixed --- github.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github.js b/github.js index 3005999..0a68553 100644 --- a/github.js +++ b/github.js @@ -538,7 +538,7 @@ gh.issue = function (user, repo, number) { if ( !(this instanceof gh.issue) ) - return new gh.commit(user, repo, number); + return new gh.issue(user, repo, number); this.user = user; this.repo = repo; this.number = number; From 2c4fdbe2090ed965d78cf9782698b88bc0b98f24 Mon Sep 17 00:00:00 2001 From: avyaznikov Date: Wed, 25 Jan 2012 17:59:58 +0400 Subject: [PATCH 2/2] Update github.js --- github.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/github.js b/github.js index 0a68553..7b5acde 100644 --- a/github.js +++ b/github.js @@ -543,6 +543,23 @@ this.repo = repo; this.number = number; }; + + //View open issues + gh.issue.prototype.openIssues = function (callback, context) { + jsonp("issues/list/" + this.user + "/" + this.repo + "/open", + callback, + context); + return this; + }; + + //View closed issues + gh.issue.prototype.closedIssues = function (callback, context) { + jsonp("issues/list/" + this.user + "/" + this.repo + "/closed", + callback, + context); + return this; + }; + // View this issue's info. gh.issue.prototype.show = function (callback, context) {