export to, clone from github

This commit is contained in:
João Moreno
2020-05-18 15:51:15 +02:00
parent ee4e97fe6a
commit b629dba454
6 changed files with 27 additions and 16 deletions

View File

@@ -40,7 +40,9 @@ export class GithubRemoteSourceProvider implements RemoteSourceProvider {
private async getUserRemoteSources(octokit: Octokit, query?: string): Promise<RemoteSource[]> {
if (!query) {
const res = await octokit.repos.list({ sort: 'pushed', per_page: 100 });
const user = await octokit.users.getAuthenticated({});
const username = user.data.login;
const res = await octokit.repos.listForUser({ username, sort: 'updated', per_page: 100 });
this.userReposCache = res.data.map(asRemoteSource);
}