diff --git a/lib/config/presets/__snapshots__/github.spec.ts.snap b/lib/config/presets/__snapshots__/github.spec.ts.snap
deleted file mode 100644
index e1ce92515027c84d5475284f17acf758cab45a86..0000000000000000000000000000000000000000
--- a/lib/config/presets/__snapshots__/github.spec.ts.snap
+++ /dev/null
@@ -1,70 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`config/presets/github getPreset() uses default endpoint 1`] = `
-Array [
-  Array [
-    "https://api.github.com/repos/some/repo/contents/default.json",
-    Object {
-      "headers": Object {
-        "accept": "application/vnd.github.v3+json",
-      },
-      "hooks": Object {
-        "beforeRedirect": Array [
-          [Function],
-        ],
-      },
-      "hostType": "github",
-      "json": true,
-      "method": "get",
-    },
-  ],
-  Array [
-    "https://api.github.com/repos/some/repo/contents/renovate.json",
-    Object {
-      "headers": Object {
-        "accept": "application/vnd.github.v3+json",
-      },
-      "hooks": Object {
-        "beforeRedirect": Array [
-          [Function],
-        ],
-      },
-      "hostType": "github",
-      "json": true,
-      "method": "get",
-    },
-  ],
-  Array [
-    "https://api.github.com/repos/some/repo/contents/default.json",
-    Object {
-      "headers": Object {
-        "accept": "application/vnd.github.v3+json",
-      },
-      "hooks": Object {
-        "beforeRedirect": Array [
-          [Function],
-        ],
-      },
-      "hostType": "github",
-      "json": true,
-      "method": "get",
-    },
-  ],
-  Array [
-    "https://api.github.com/repos/some/repo/contents/renovate.json",
-    Object {
-      "headers": Object {
-        "accept": "application/vnd.github.v3+json",
-      },
-      "hooks": Object {
-        "beforeRedirect": Array [
-          [Function],
-        ],
-      },
-      "hostType": "github",
-      "json": true,
-      "method": "get",
-    },
-  ],
-]
-`;
diff --git a/lib/config/presets/__snapshots__/gitlab.spec.ts.snap b/lib/config/presets/__snapshots__/gitlab.spec.ts.snap
deleted file mode 100644
index 34e8c20b4f23752f2cdee1cf02bd73371a1e7f6c..0000000000000000000000000000000000000000
--- a/lib/config/presets/__snapshots__/gitlab.spec.ts.snap
+++ /dev/null
@@ -1,12 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`config/presets/gitlab getPreset() uses default endpoint 1`] = `
-Array [
-  Array [
-    "https://gitlab.com/api/v4/projects/some%2Frepo/repository/branches",
-  ],
-  Array [
-    "https://gitlab.com/api/v4/projects/some%2Frepo/repository/branches",
-  ],
-]
-`;
diff --git a/lib/config/presets/__snapshots__/local.spec.ts.snap b/lib/config/presets/__snapshots__/local.spec.ts.snap
index f2713740ee5bcb36f2eec6c1fdfae85e1877e59a..130b863db6d22beba568c71c8f9f0c94589f271d 100644
--- a/lib/config/presets/__snapshots__/local.spec.ts.snap
+++ b/lib/config/presets/__snapshots__/local.spec.ts.snap
@@ -5,10 +5,7 @@ Array [
   Array [
     "some/repo",
     "",
-    Object {
-      "endpoint": "https://api.github.example.com",
-      "platform": "GitHub",
-    },
+    "https://api.github.example.com",
   ],
 ]
 `;
@@ -24,10 +21,7 @@ Array [
   Array [
     "some/repo",
     "",
-    Object {
-      "endpoint": "https://gitlab.example.com/api/v4",
-      "platform": "gitlab",
-    },
+    "https://gitlab.example.com/api/v4",
   ],
 ]
 `;
@@ -43,9 +37,7 @@ Array [
   Array [
     "some/repo",
     "default",
-    Object {
-      "platform": "github",
-    },
+    undefined,
   ],
 ]
 `;
@@ -61,9 +53,7 @@ Array [
   Array [
     "some/repo",
     "",
-    Object {
-      "platform": "GitLab",
-    },
+    undefined,
   ],
 ]
 `;
diff --git a/lib/config/presets/github.spec.ts b/lib/config/presets/github.spec.ts
index 16cc36ddf62d820b62d62558e5766ff4f6ce7899..c899f2550bed5a6ccc62e00087c87b9b63ebb9c6 100644
--- a/lib/config/presets/github.spec.ts
+++ b/lib/config/presets/github.spec.ts
@@ -5,7 +5,6 @@ import * as _hostRules from '../../util/host-rules';
 import { PLATFORM_FAILURE } from '../../constants/error-messages';
 import { mocked } from '../../../test/util';
 import { GotResponse } from '../../platform';
-import { PLATFORM_TYPE_GITHUB } from '../../constants/platforms';
 
 jest.mock('../../platform/github/gh-got-wrapper');
 jest.mock('../../util/got');
@@ -73,25 +72,15 @@ describe('config/presets/github', () => {
         delete global.appMode;
       }
     });
-
-    it('uses default endpoint', async () => {
-      await github.getPreset('some/repo', 'default').catch((_) => {});
-      await github
-        .getPreset('some/repo', 'default', {
-          endpoint: 'https://api.github.example.org',
-        })
-        .catch((_) => {});
-      expect(got.mock.calls[0][0]).toEqual(
-        'https://api.github.com/repos/some/repo/contents/default.json'
-      );
-      expect(got.mock.calls).toMatchSnapshot();
-    });
+  });
+  describe('getPresetFromEndpoint()', () => {
     it('uses custom endpoint', async () => {
       await github
-        .getPreset('some/repo', 'default', {
-          platform: PLATFORM_TYPE_GITHUB,
-          endpoint: 'https://api.github.example.org',
-        })
+        .getPresetFromEndpoint(
+          'some/repo',
+          'default',
+          'https://api.github.example.org'
+        )
         .catch((_) => {});
       expect(got.mock.calls[0][0]).toEqual(
         'https://api.github.example.org/repos/some/repo/contents/default.json'
diff --git a/lib/config/presets/github.ts b/lib/config/presets/github.ts
index d92a358b862fd195638c2ef994f73ed3ccc888a3..9d73a5293da3e84ba919146e9ac6656f6ee3a88c 100644
--- a/lib/config/presets/github.ts
+++ b/lib/config/presets/github.ts
@@ -3,7 +3,6 @@ import { Preset } from './common';
 import { Http, HttpOptions } from '../../util/http';
 import { PLATFORM_FAILURE } from '../../constants/error-messages';
 import { ensureTrailingSlash } from '../../util/url';
-import { RenovateConfig } from '../common';
 import { PLATFORM_TYPE_GITHUB } from '../../constants/platforms';
 
 const http = new Http(PLATFORM_TYPE_GITHUB);
@@ -43,16 +42,13 @@ async function fetchJSONFile(
   }
 }
 
-export async function getPreset(
+export async function getPresetFromEndpoint(
   pkgName: string,
-  presetName = 'default',
-  baseConfig?: RenovateConfig
+  presetName: string,
+  endpoint = 'https://api.github.com/'
 ): Promise<Preset> {
-  const endpoint = ensureTrailingSlash(
-    (baseConfig?.platform === PLATFORM_TYPE_GITHUB
-      ? baseConfig?.endpoint
-      : null) ?? 'https://api.github.com/'
-  );
+  // eslint-disable-next-line no-param-reassign
+  endpoint = ensureTrailingSlash(endpoint);
   if (presetName === 'default') {
     try {
       const defaultJson = await fetchJSONFile(
@@ -74,3 +70,10 @@ export async function getPreset(
   }
   return fetchJSONFile(pkgName, `${presetName}.json`, endpoint);
 }
+
+export async function getPreset(
+  pkgName: string,
+  presetName = 'default'
+): Promise<Preset> {
+  return getPresetFromEndpoint(pkgName, presetName);
+}
diff --git a/lib/config/presets/gitlab.spec.ts b/lib/config/presets/gitlab.spec.ts
index 88a3a00942838762c964cf2d0c29c5fbb4e24dac..ff3a357901b5bca34e8b2e2fab903bff7c9dba2e 100644
--- a/lib/config/presets/gitlab.spec.ts
+++ b/lib/config/presets/gitlab.spec.ts
@@ -2,7 +2,6 @@ import { PartialDeep } from 'type-fest';
 import * as gitlab from './gitlab';
 import { api } from '../../platform/gitlab/gl-got-wrapper';
 import { GotResponse } from '../../platform';
-import { PLATFORM_TYPE_GITLAB } from '../../constants/platforms';
 
 jest.mock('../../platform/gitlab/gl-got-wrapper');
 jest.mock('../../util/got');
@@ -55,24 +54,15 @@ describe('config/presets/gitlab', () => {
       const content = await gitlab.getPreset('some/repo');
       expect(content).toEqual({ foo: 'bar' });
     });
-    it('uses default endpoint', async () => {
-      await gitlab.getPreset('some/repo', 'default').catch((_) => {});
-      await gitlab
-        .getPreset('some/repo', 'default', {
-          endpoint: 'https://gitlab.example.org/api/v4',
-        })
-        .catch((_) => {});
-      expect(glGot.mock.calls[0][0]).toEqual(
-        'https://gitlab.com/api/v4/projects/some%2Frepo/repository/branches'
-      );
-      expect(glGot.mock.calls).toMatchSnapshot();
-    });
+  });
+  describe('getPresetFromEndpoint()', () => {
     it('uses custom endpoint', async () => {
       await gitlab
-        .getPreset('some/repo', 'default', {
-          platform: PLATFORM_TYPE_GITLAB,
-          endpoint: 'https://gitlab.example.org/api/v4',
-        })
+        .getPresetFromEndpoint(
+          'some/repo',
+          'default',
+          'https://gitlab.example.org/api/v4'
+        )
         .catch((_) => {});
       expect(glGot.mock.calls[0][0]).toEqual(
         'https://gitlab.example.org/api/v4/projects/some%2Frepo/repository/branches'
diff --git a/lib/config/presets/gitlab.ts b/lib/config/presets/gitlab.ts
index d2d7d9e78b99792252e17b2eeab62fd4437d803a..6c213f0f2af6b89a8d58a10b1396eade27c8a0ae 100644
--- a/lib/config/presets/gitlab.ts
+++ b/lib/config/presets/gitlab.ts
@@ -2,8 +2,6 @@ import { api } from '../../platform/gitlab/gl-got-wrapper';
 import { logger } from '../../logger';
 import { Preset } from './common';
 import { ensureTrailingSlash } from '../../util/url';
-import { RenovateConfig } from '../common';
-import { PLATFORM_TYPE_GITLAB } from '../../constants/platforms';
 
 const { get: glGot } = api;
 
@@ -30,16 +28,13 @@ async function getDefaultBranchName(
   return defautlBranchName;
 }
 
-export async function getPreset(
+export async function getPresetFromEndpoint(
   pkgName: string,
-  presetName = 'default',
-  baseConfig?: RenovateConfig
+  presetName: string,
+  endpoint = 'https://gitlab.com/api/v4/'
 ): Promise<Preset> {
-  const endpoint = ensureTrailingSlash(
-    (baseConfig?.platform === PLATFORM_TYPE_GITLAB
-      ? baseConfig?.endpoint
-      : null) ?? 'https://gitlab.com/api/v4/'
-  );
+  // eslint-disable-next-line no-param-reassign
+  endpoint = ensureTrailingSlash(endpoint);
   if (presetName !== 'default') {
     // TODO: proper error contructor
     throw new Error(
@@ -71,3 +66,10 @@ export async function getPreset(
     throw new Error('invalid preset JSON');
   }
 }
+
+export async function getPreset(
+  pkgName: string,
+  presetName = 'default'
+): Promise<Preset> {
+  return getPresetFromEndpoint(pkgName, presetName);
+}
diff --git a/lib/config/presets/local.spec.ts b/lib/config/presets/local.spec.ts
index affa203bf2d0ba6a14ea78909436617f4f3bf373..5780818d57289669e19cc88e5ab4e5b755a7467d 100644
--- a/lib/config/presets/local.spec.ts
+++ b/lib/config/presets/local.spec.ts
@@ -5,8 +5,12 @@ import * as local from './local';
 jest.mock('./gitlab');
 jest.mock('./github');
 
-const gitlabGetPreset: jest.Mock<Promise<any>> = gitlab.getPreset as never;
-const githubGetPreset: jest.Mock<Promise<any>> = github.getPreset as never;
+const gitlabGetPreset: jest.Mock<Promise<
+  any
+>> = gitlab.getPresetFromEndpoint as never;
+const githubGetPreset: jest.Mock<Promise<
+  any
+>> = github.getPresetFromEndpoint as never;
 
 describe('config/presets/local', () => {
   beforeEach(() => {
@@ -25,6 +29,13 @@ describe('config/presets/local', () => {
         })
       ).rejects.toThrow();
     });
+    it('throws for missing platform', async () => {
+      await expect(
+        local.getPreset('some/repo', 'default', {
+          platform: undefined,
+        })
+      ).rejects.toThrow();
+    });
     it('forwards to gitlab', async () => {
       const content = await local.getPreset('some/repo', '', {
         platform: 'GitLab',
diff --git a/lib/config/presets/local.ts b/lib/config/presets/local.ts
index 5b466f52f238b8d57ca908bc959f6869ff8e6963..801db16dd77bfef711d780c4e935992eaf93454d 100644
--- a/lib/config/presets/local.ts
+++ b/lib/config/presets/local.ts
@@ -2,19 +2,28 @@ import { Preset } from './common';
 import * as gitlab from './gitlab';
 import * as github from './github';
 import { RenovateConfig } from '../common';
+import {
+  PLATFORM_TYPE_GITHUB,
+  PLATFORM_TYPE_GITLAB,
+} from '../../constants/platforms';
 
 export async function getPreset(
   pkgName: string,
   presetName = 'default',
   baseConfig: RenovateConfig
 ): Promise<Preset> {
-  if (baseConfig.platform?.toLowerCase() === 'gitlab') {
-    return gitlab.getPreset(pkgName, presetName, baseConfig);
+  const { platform, endpoint } = baseConfig;
+  if (!platform) {
+    throw new Error(`Missing platform config for local preset.`);
   }
-  if (baseConfig.platform?.toLowerCase() === 'github') {
-    return github.getPreset(pkgName, presetName, baseConfig);
+  switch (platform.toLowerCase()) {
+    case PLATFORM_TYPE_GITLAB:
+      return gitlab.getPresetFromEndpoint(pkgName, presetName, endpoint);
+    case PLATFORM_TYPE_GITHUB:
+      return github.getPresetFromEndpoint(pkgName, presetName, endpoint);
+    default:
+      throw new Error(
+        `Unsupported platform '${baseConfig.platform}' for local preset.`
+      );
   }
-  throw new Error(
-    `Unsupported platform '${baseConfig.platform}' for local preset.`
-  );
 }