From 936fc76ea1b8122cceefae993b46c2a9be263e36 Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@arkins.net>
Date: Fri, 8 Mar 2019 18:16:21 +0100
Subject: [PATCH] feat: raise issue for active repos without configs

Closes #3336
---
 lib/workers/repository/onboarding/branch/check.js | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/lib/workers/repository/onboarding/branch/check.js b/lib/workers/repository/onboarding/branch/check.js
index dc02c738ed..b6c39d87b3 100644
--- a/lib/workers/repository/onboarding/branch/check.js
+++ b/lib/workers/repository/onboarding/branch/check.js
@@ -68,6 +68,16 @@ const isOnboarded = async config => {
     logger.info(
       'Repo is not onboarded but at least one merged PR exists - treat as onboarded'
     );
+    const title = `Action required: Add a ${appName} config`;
+    let body = `Hi,\n\nYou will need to add a config to this repository if you want ${appName}  to continue creating PRs. ${appName} will soon begin skipping all repositories that don't have a valid config found, even if you've received PRs before.\n\n`;
+    body +=
+      'To keep functionality exactly the same, you can add an empty JSON config (`{}`) to your repo in any of the following files: ';
+    body += configFileNames
+      .filter(filename => filename !== 'package.json')
+      .map(filename => `\`${filename}\``)
+      .join(', ');
+    const once = true;
+    await platform.ensureIssue(title, body, once);
     return true;
   }
   logger.info('Repo is not onboarded and no merged PRs exist');
-- 
GitLab