From 2e546e4582a8919815e733d58e7f8d0e1fbeda60 Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@arkins.net> Date: Wed, 7 Aug 2019 10:19:45 +0300 Subject: [PATCH] chore: fix github PlatformConfig ts --- lib/platform/common.ts | 3 +++ lib/platform/github/index.ts | 9 ++------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/platform/common.ts b/lib/platform/common.ts index 0d44da6593..0a0467bdb3 100644 --- a/lib/platform/common.ts +++ b/lib/platform/common.ts @@ -40,6 +40,9 @@ export interface GotApi<TOptions extends object = any> { } export interface PlatformConfig { + endpoint?: string; + renovateUsername?: any; + gitAuthor?: any; isFork: boolean; privateRepo: boolean; // do we need this? diff --git a/lib/platform/github/index.ts b/lib/platform/github/index.ts index 58de4b6691..a2d9eff0c5 100644 --- a/lib/platform/github/index.ts +++ b/lib/platform/github/index.ts @@ -7,6 +7,7 @@ import { logger } from '../../logger'; import { api } from './gh-got-wrapper'; import * as hostRules from '../../util/host-rules'; import GitStorage from '../git/storage'; +import { PlatformConfig } from '../common'; import { appName, @@ -17,12 +18,6 @@ import { const defaultConfigFile = configFileNames[0]; -interface PlatformConfig { - gitAuthor: string; - renovateUsername: string; - endpoint: string; -} - interface Comment { id: number; body: string; @@ -191,7 +186,7 @@ export async function initRepo({ [config.repositoryOwner, config.repositoryName] = repository.split('/'); config.gitPrivateKey = gitPrivateKey; // platformConfig is passed back to the app layer and contains info about the platform they require - const platformConfig: { privateRepo: boolean; isFork: boolean } = {} as any; + const platformConfig: PlatformConfig = {} as any; let res; try { res = await api.get(`repos/${repository}`); -- GitLab