Closed christianspecht closed 5 years ago
GET /user/repos
isn't enough, the scope is also important: our docs say repo:status
, but this is not enough, the private repo is shown when setting the scope to repo
.
repo
GET /user/repos
+ scope repo
also shows repos from orgs where the user is a member
--> only use the repos which actually belong to the user, so SCM Backup behaves consistently across all hosters? (give it a user and it backs up the repos of that user). Or make this configurable for GitHub?--> this means that we must authenticate with the user whose repos we want to backup. Authenticating with User A to backup User B (which works on Bitbucket) is not possible on GitHub!
Correction: this doesn't work on Bitbucket either, so we should check this at runtime!
Does the API return the scope? If yes, display a warning if the scope is "too low" (so only public repos are shown)
GitHub Free now includes unlimited private repositories, but the Github API call that SCM Backup makes doesn't return the private test repo I created.
Apparently it's because of this:
GET /users/:username/repos
(which SCM Backup is using at the moment) only shows public repos, even when authenticated. To see private repos, we need to useGET /user/repos
--> this means that we must authenticate with the user whose repos we want to backup. Authenticating with User A to backup User B (which works on Bitbucket) is not possible on GitHub!