Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is the difference between user.userRepos and user.repos? #257

Closed
aendra-rininsland opened this issue Nov 17, 2015 · 2 comments
Closed
Assignees

Comments

@aendra-rininsland
Copy link
Member

The former is awful for performance; it seems like they're roughly the same thing.

@AurelioDeRosa
Copy link
Member

userRepos() and repos() are very similar. The only difference is that repos() retrieves the repositories of the authenticated user while userRepos() retrieves the repositories of the username provided. The reason for the difference in performance is that userRepos() was doing the right thing while repos() wasn't. To be precise, userRepos() was retrieving all the repositories of the test user that we employ for our tests. repos() was only retrieving the first page (e.g. the first 100 repositories).

The issue with repos() has been fixed in commit adcfbdd.

In addition to that, userRepos() has the problem that it didn't allow a user to specify the same options that we support in repos(). This has been fixed in commit 2373a36.

@AurelioDeRosa AurelioDeRosa self-assigned this Feb 21, 2016
@aendra-rininsland
Copy link
Member Author

@AurelioDeRosa 🎉 Awesome, thanks for clarifying that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants