show only public repos

This commit is contained in:
Ruidy Nemausat 2020-05-20 18:08:35 +02:00
parent f54ad80aa2
commit 5821310861

View file

@ -18,8 +18,11 @@ const getGithubRepos = async (owner: string) => {
const {data: repos} = await octokit.repos.listForAuthenticatedUser({ const {data: repos} = await octokit.repos.listForAuthenticatedUser({
owner, owner,
}); });
const newRepo: Repo[] = repos.map((r: any) => ({
url: r.url, const newRepo: Repo[] = repos
.filter((r: any) => r.private === false)
.map((r: any) => ({
url: r.html_url,
stars: r.stargazers_count, stars: r.stargazers_count,
forks: r.forks_count, forks: r.forks_count,
description: r.description, description: r.description,