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

Cannot list private repositories for an organization #73

Open
mxcl opened this issue Jan 7, 2019 · 3 comments
Open

Cannot list private repositories for an organization #73

mxcl opened this issue Jan 7, 2019 · 3 comments

Comments

@mxcl
Copy link

mxcl commented Jan 7, 2019

The url for org repos is:

/org/\(name)/repos

But the code only uses:

/user/\(name)/repos

Which lists public repos, but not private ones.

@pietbrauer
Copy link
Member

PullRequests are welcome

@mxcl
Copy link
Author

mxcl commented Jan 10, 2019

I will PR, any particular way you want this done? It could be different functions, it could be an enum parameter, boolean parameter. Or I can just choose.

@phatblat
Copy link
Member

Looks like owner is just a string, but it would be ideal if there were a way to automatically determine user vs. org behind the scenes and then make the right API call. However, if it takes an extra API call to determine user type, then maybe best to have different function such as userRepositories and orgRepositories.

The /users/:username/repos and /orgs/:org/repos endpoints have slightly different parameters, but appear to have the same payload format, so should be able to use the same Repository model for parsing.

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

3 participants