From 7e0be69abb5857431777905ccb1edb1ff7bc7633 Mon Sep 17 00:00:00 2001 From: Sheogorath Date: Tue, 25 Sep 2018 00:26:30 +0200 Subject: [PATCH] Omit unneeded warning if no gitlab is configured This patch should fix the unneeded warning of the wrong API version, when gitlab isn't configured at all. Signed-off-by: Sheogorath --- 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 f96684e..26f0ae9 100644 --- a/lib/config/index.js +++ b/lib/config/index.js @@ -104,7 +104,7 @@ config.isOAuth2Enable = config.oauth2.clientID && config.oauth2.clientSecret config.isPDFExportEnable = config.allowPDFExport // Check gitlab api version -if (config.gitlab.version !== 'v4' && config.gitlab.version !== 'v3') { +if (config.gitlab && config.gitlab.version !== 'v4' && config.gitlab.version !== 'v3') { logger.warn('config.js contains wrong version (' + config.gitlab.version + ') for gitlab api; it should be \'v3\' or \'v4\'. Defaulting to v4') config.gitlab.version = 'v4' }