Skip to content

Commit

Permalink
Merge pull request #16 from avyaznikov/patch-1
Browse files Browse the repository at this point in the history
new gh-issue fixed
  • Loading branch information
fitzgen committed Jan 30, 2012
2 parents 811d15f + 2c4fdbe commit 5daf22b
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion github.js
Expand Up @@ -538,11 +538,28 @@


gh.issue = function (user, repo, number) { gh.issue = function (user, repo, number) {
if ( !(this instanceof gh.issue) ) if ( !(this instanceof gh.issue) )
return new gh.commit(user, repo, number); return new gh.issue(user, repo, number);
this.user = user; this.user = user;
this.repo = repo; this.repo = repo;
this.number = number; 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. // View this issue's info.
gh.issue.prototype.show = function (callback, context) { gh.issue.prototype.show = function (callback, context) {
Expand Down

0 comments on commit 5daf22b

Please sign in to comment.