From 0ea636209c663dc432a6a4bb65d07d06cc56da24 Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@arkins.net>
Date: Mon, 3 Feb 2020 14:19:17 +0100
Subject: [PATCH] fix(onboarding): remove docker-only rule

---
 .../onboarding/pr/config-description.ts         | 17 +----------------
 .../config-description.spec.ts.snap             | 17 -----------------
 .../onboarding/pr/config-description.spec.ts    | 14 --------------
 3 files changed, 1 insertion(+), 47 deletions(-)

diff --git a/lib/workers/repository/onboarding/pr/config-description.ts b/lib/workers/repository/onboarding/pr/config-description.ts
index 313f5c8f7c..34850ab68c 100644
--- a/lib/workers/repository/onboarding/pr/config-description.ts
+++ b/lib/workers/repository/onboarding/pr/config-description.ts
@@ -3,11 +3,6 @@ import { logger } from '../../../../logger';
 import { configFileNames } from '../../../../config/app-strings';
 import { RenovateConfig } from '../../../../config';
 import { PackageFile } from '../../../../manager/common';
-import {
-  MANAGER_CIRCLE_CI,
-  MANAGER_DOCKER_COMPOSE,
-  MANAGER_DOCKERFILE,
-} from '../../../../constants/managers';
 
 const defaultConfigFile = configFileNames[0];
 
@@ -38,22 +33,12 @@ export function getConfigDesc(
 ): string {
   logger.debug('getConfigDesc()');
   logger.trace({ config });
-  let descriptionArr = getDescriptionArray(config);
+  const descriptionArr = getDescriptionArray(config);
   if (!descriptionArr.length) {
     logger.debug('No config description found');
     return '';
   }
   logger.debug({ length: descriptionArr.length }, 'Found description array');
-  const enabledManagers = packageFiles ? Object.keys(packageFiles) : [];
-  if (
-    !(
-      enabledManagers.includes(MANAGER_DOCKERFILE) ||
-      enabledManagers.includes(MANAGER_CIRCLE_CI) ||
-      enabledManagers.includes(MANAGER_DOCKER_COMPOSE)
-    )
-  ) {
-    descriptionArr = descriptionArr.filter(val => !val.includes('Docker-only'));
-  }
   let desc = `\n### Configuration Summary\n\nBased on the default config's presets, Renovate will:\n\n`;
   desc += `  - Start dependency updates only once this onboarding PR is merged\n`;
   descriptionArr.forEach(d => {
diff --git a/test/workers/repository/onboarding/pr/__snapshots__/config-description.spec.ts.snap b/test/workers/repository/onboarding/pr/__snapshots__/config-description.spec.ts.snap
index e829c9b984..d6386d3a94 100644
--- a/test/workers/repository/onboarding/pr/__snapshots__/config-description.spec.ts.snap
+++ b/test/workers/repository/onboarding/pr/__snapshots__/config-description.spec.ts.snap
@@ -15,23 +15,6 @@ Based on the default config's presets, Renovate will:
 "
 `;
 
-exports[`workers/repository/onboarding/pr/config-description getConfigDesc() returns a filtered list 1`] = `
-"
-### Configuration Summary
-
-Based on the default config's presets, Renovate will:
-
-  - Start dependency updates only once this onboarding PR is merged
-  - description 1
-  - description two
-  - something else
-
-:abcd: Would you like to change the way Renovate is upgrading your dependencies? Simply edit the \`renovate.json\` in this branch with your custom config and the list of Pull Requests in the \\"What to Expect\\" section below will be updated the next time Renovate runs.
-
----
-"
-`;
-
 exports[`workers/repository/onboarding/pr/config-description getConfigDesc() returns a full list 1`] = `
 "
 ### Configuration Summary
diff --git a/test/workers/repository/onboarding/pr/config-description.spec.ts b/test/workers/repository/onboarding/pr/config-description.spec.ts
index 4cc1cb2de2..2c8296e437 100644
--- a/test/workers/repository/onboarding/pr/config-description.spec.ts
+++ b/test/workers/repository/onboarding/pr/config-description.spec.ts
@@ -29,20 +29,6 @@ describe('workers/repository/onboarding/pr/config-description', () => {
       expect(res).toMatchSnapshot();
       expect(res.indexOf('Docker-only')).not.toBe(-1);
     });
-    it('returns a filtered list', () => {
-      const packageFiles = {
-        npm: [],
-      };
-      config.description = [
-        'description 1',
-        'description two',
-        'something else',
-        'this is Docker-only',
-      ];
-      const res = getConfigDesc(config, packageFiles);
-      expect(res).toMatchSnapshot();
-      expect(res.indexOf('Docker-only')).toBe(-1);
-    });
     it('assignees, labels and schedule', () => {
       delete config.description;
       config.packageFiles = [];
-- 
GitLab