feat: raise issue for active repos without configs

Closes #3336
This commit is contained in:
Rhys Arkins 2019-03-08 18:16:21 +01:00
parent 89d4807c76
commit 936fc76ea1

View file

@ -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');