diff --git a/lib/workers/repository/onboarding.js b/lib/workers/repository/onboarding.js
index b1e4eb6096d41795d7781fea2ae6bdac65a8f57f..14dcc31054d2023c50495777cec42ca78b0062eb 100644
--- a/lib/workers/repository/onboarding.js
+++ b/lib/workers/repository/onboarding.js
@@ -12,8 +12,10 @@ async function isRepoPrivate(config) {
   for (const packageFile of config.packageFiles) {
     const fileName =
       typeof packageFile === 'string' ? packageFile : packageFile.packageFile;
-    const packageContent = await config.api.getFileJson(fileName);
-    repoIsPrivate = repoIsPrivate && packageContent && packageContent.private;
+    if (fileName.endsWith('package.json')) {
+      const packageContent = await config.api.getFileJson(fileName);
+      repoIsPrivate = repoIsPrivate && packageContent && packageContent.private;
+    }
   }
   return repoIsPrivate === true;
 }