diff --git a/lib/workers/repository/onboarding/branch/config.ts b/lib/workers/repository/onboarding/branch/config.ts index 1aa01c1fd43eec..f8ce71c5043fb8 100644 --- a/lib/workers/repository/onboarding/branch/config.ts +++ b/lib/workers/repository/onboarding/branch/config.ts @@ -26,8 +26,9 @@ async function getOnboardingConfig( // Check for org/renovate-config try { const repo = `${orgName}/renovate-config`; - await getPreset({ repo }); - orgPreset = `local>${repo}`; + if (await getPreset({ repo })) { + orgPreset = `local>${repo}`; + } } catch (err) { if ( err.message !== PRESET_DEP_NOT_FOUND && @@ -43,11 +44,14 @@ async function getOnboardingConfig( try { const repo = `${orgName}/.${platform}`; const presetName = 'renovate-config'; - await getPreset({ - repo, - presetName, - }); - orgPreset = `local>${repo}:${presetName}`; + if ( + await getPreset({ + repo, + presetName, + }) + ) { + orgPreset = `local>${repo}:${presetName}`; + } } catch (err) { if ( err.message !== PRESET_DEP_NOT_FOUND && @@ -59,6 +63,9 @@ async function getOnboardingConfig( } if (orgPreset) { + logger.debug( + `Found org preset ${orgPreset} - using it in onboarding config` + ); onboardingConfig = { $schema: 'https://docs.renovatebot.com/renovate-schema.json', extends: [orgPreset],