From 3e87a9bb306b7a06d06c06243d048578ccf9505a Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Sat, 10 Nov 2018 19:59:08 +0100 Subject: [PATCH] test --- README.md | 2 +- src/components/Repositories/Repository.jsx | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 03f5ec9c..d012aa07 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ You can attach multiple links to a repo like so: url: https://github.com/oceanprotocol/keeper-contracts/tree/develop/doc ``` -The GitHub link is automatically added for every repository name and will always be displayed. +The GitHub link is automatically added for every repository name and will always be displayed. You can add a private repo to prepare for a release, it won't be displayed until it is made public on GitHub. - [`/data/repositories.yml`](data/repositories.yml) diff --git a/src/components/Repositories/Repository.jsx b/src/components/Repositories/Repository.jsx index 87647574..2b5116a9 100644 --- a/src/components/Repositories/Repository.jsx +++ b/src/components/Repositories/Repository.jsx @@ -7,7 +7,7 @@ const queryGithub = graphql` query GitHubReposInfo { github { organization(login: "oceanprotocol") { - repositories(first: 100, isFork: false) { + repositories(first: 100, privacy: PUBLIC, isFork: false) { edges { node { name @@ -37,6 +37,11 @@ const Repository = ({ name, links }) => ( .filter(n => n) const repo = repoFilteredArray[0] + + // safeguard against more empty items, + // e.g. when private repos are referenced in repositories.yml + if (repo === undefined) return null + const { url, description } = repo return (