Permalink
Browse files

Merge pull request #16 from avyaznikov/patch-1

new gh-issue fixed
  • Loading branch information...
2 parents 811d15f + 2c4fdbe commit 5daf22b2891dd24e60a0a3e020a207153259570a @fitzgen committed Jan 30, 2012
Showing with 18 additions and 1 deletion.
  1. +18 −1 github.js
View
@@ -538,11 +538,28 @@
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;
};
+
+ //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) {

0 comments on commit 5daf22b

Please sign in to comment.