diff --git a/lib/workers/repository/onboarding/branch/check.js b/lib/workers/repository/onboarding/branch/check.js index cfce3b3503c785e41042c225d6d01e9ea3b43fad..ddfa215c4d88c25f5140e5cef8d440eeab5c7ec7 100644 --- a/lib/workers/repository/onboarding/branch/check.js +++ b/lib/workers/repository/onboarding/branch/check.js @@ -73,25 +73,6 @@ const isOnboarded = async config => { logger.debug('Config not mandatory so repo is considered onboarded'); return true; } - const mergedPrExists = (await platform.getPrList()).some( - p => p.state === 'merged' && p.branchName.startsWith(config.branchPrefix) - ); - if (mergedPrExists) { - logger.info( - 'Repo is not onboarded but at least one merged PR exists - treat as onboarded' - ); - 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); - logger.trace({ title, body, once }, 'Warning issue'); - return true; - } logger.info('Repo is not onboarded and no merged PRs exist'); if (!config.suppressNotifications.includes('onboardingClose')) { // ensure PR comment diff --git a/test/workers/repository/onboarding/branch/index.spec.js b/test/workers/repository/onboarding/branch/index.spec.js index 96e8353231500f065e7289e9d3fe57935b7cafc3..2e1511832f371bdaf989ae0c6ad3fb78ec7aadb2 100644 --- a/test/workers/repository/onboarding/branch/index.spec.js +++ b/test/workers/repository/onboarding/branch/index.spec.js @@ -72,15 +72,6 @@ describe('workers/repository/onboarding/branch', () => { const res = await checkOnboardingBranch(config); expect(res.repoIsOnboarded).toBe(true); }); - it('detects repo is onboarded via PR and merged', async () => { - config.requireConfig = true; - platform.findPr.mockReturnValue(true); - platform.getPrList.mockReturnValueOnce([ - { branchName: 'renovate/something', state: 'merged' }, - ]); - const res = await checkOnboardingBranch(config); - expect(res.repoIsOnboarded).toBe(true); - }); it('throws if no required config', async () => { config.requireConfig = true; platform.findPr.mockReturnValue(true);