Skip to content

Commit adcfbdd

Browse files
committed
repos: Return all repositories available
Fixes gh-25
1 parent 87bcd33 commit adcfbdd

6 files changed

Lines changed: 10 additions & 10 deletions

File tree

dist/github.bundle.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/github.bundle.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/github.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/github.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/github.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@
160160

161161
url += '?' + params.join('&');
162162

163-
_request('GET', url, null, cb);
163+
_requestAllPages(url, cb);
164164
};
165165

166166
// List user organizations

test/test.user.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ describe('Github.User', function() {
1515
});
1616

1717
it('should get user.repos', function(done) {
18-
user.repos(function(err) {
18+
user.repos(function(err, repos) {
1919
should.not.exist(err);
20+
repos.should.be.instanceof(Array);
2021
done();
2122
});
2223
});
@@ -25,14 +26,13 @@ describe('Github.User', function() {
2526
var options = {
2627
type: 'owner',
2728
sort: 'updated',
28-
per_page: 10, // jscs:ignore
29-
page: 1
29+
per_page: 90, // jscs:ignore
30+
page: 10
3031
};
3132

3233
user.repos(options, function(err, repos) {
33-
repos.should.have.length(10);
3434
should.not.exist(err);
35-
35+
repos.should.be.instanceof(Array);
3636
done();
3737
});
3838
});

0 commit comments

Comments
 (0)