From 50b3b195c00ef81d69394ff1368e83c4daad1dd2 Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@arkins.net>
Date: Wed, 11 Apr 2018 12:03:38 +0200
Subject: [PATCH] fix: check discovered length, not manually configured length

Closes #1823
---
 lib/config/index.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/config/index.js b/lib/config/index.js
index 2ac2e8409d..94b9f09ab6 100644
--- a/lib/config/index.js
+++ b/lib/config/index.js
@@ -74,7 +74,7 @@ async function parseConfigs(env, argv) {
       config.token,
       config.endpoint
     );
-    if (!config.repositories || config.repositories.length === 0) {
+    if (!(discovered && discovered.length)) {
       // Soft fail (no error thrown) if no accessible repositories
       logger.info(
         'The account associated with your token does not have access to any repos'
-- 
GitLab