Skip to content

Commit 196dfdd

Browse files
committed
Adding anonymous contributors
1 parent 73021b6 commit 196dfdd

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

github.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,6 @@
216216
post("repos/show/" + this.user + "/" + this.repo, postData);
217217
return this;
218218
};
219-
// TODO: tags, branches
220219

221220
// Get all tags in this repo.
222221
gh.repo.prototype.tags = function (callback, context) {
@@ -250,10 +249,13 @@
250249
return this;
251250
};
252251

253-
// All users who have contributed to this repo.
254-
// TODO: anon users
255-
gh.repo.prototype.contributors = function (callback, context) {
256-
jsonp("repos/show/" + this.user + "/" + this.repo + "/contributors",
252+
// All users who have contributed to this repo. Pass true to showAnon if you
253+
// want to see the non-github contributors.
254+
gh.repo.prototype.contributors = function (callback, context, showAnon) {
255+
var url = "repos/show/" + this.user + "/" + this.repo + "/contributors";
256+
if (showAnon)
257+
url += "/anon";
258+
jsonp(url,
257259
callback,
258260
context);
259261
return this;

0 commit comments

Comments
 (0)