Open bburky opened 9 years ago
This might be somewhat tricky to fix.
A quick glance at the GitHub API docs seems to indicate that only the /user/repos API endpoint includes private repos. The normal /users/{user}/repos endpoint doesn't ever include them.
Looks like it comes with a lot of other stuff, too, that would break our URL schemes: repos for which a user is a member but not owner, etc. Spitballing a usecase, I could certainly see a team that used private repos on Big Github (as opposed to GHE), but wanted to host their own nbviewer.
This may actually have to be a whole separate provider, i.e. github-user, because of the URL scheme, which will likely never be useful on nbviewer.*.org... but it is testable, so it probably wouldn't be that crazy... PRs accepted!
On Fri, Jul 10, 2015 at 7:26 PM Blake Burkhart notifications@github.com wrote:
This might be somewhat tricky to fix.
A quick glance at the GitHub API docs https://developer.github.com/v3/repos/#list-your-repositories seems to indicate that only the /user/repos API endpoint includes private repos.
— Reply to this email directly or view it on GitHub https://github.com/jupyter/nbviewer/issues/478#issuecomment-120549837.
When running nbviewer locally with a GITHUB_API_TOKEN which has the "repo" permission, you can access the user's private repositories. This works fine.
A minor bug is that when browsing the list of users repositories, private repos are not listed.
That is when I go to http://192.168.99.100:8080/github/bburky/ I won't see my private repositories. But going to http://192.168.99.100:8080/github/bburky/private-repo/ it works fine.