From 92c5f2a4142a82e45260b0e68f4599b9e46ce4ee Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@arkins.net> Date: Tue, 1 Sep 2020 06:36:23 +0200 Subject: [PATCH] chore: move cache type to init/common --- lib/util/cache/repository/index.ts | 8 ++------ lib/workers/repository/init/common.ts | 8 ++++++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/lib/util/cache/repository/index.ts b/lib/util/cache/repository/index.ts index 428d78c1da..a88c933497 100644 --- a/lib/util/cache/repository/index.ts +++ b/lib/util/cache/repository/index.ts @@ -3,7 +3,7 @@ import { join } from 'upath'; import { RenovateConfig, RepositoryCacheConfig } from '../../../config/common'; import { logger } from '../../../logger'; import { PackageFile } from '../../../manager/common'; -import { RepoFileConfig } from '../../../workers/repository/init/common'; +import { RepoInitConfig } from '../../../workers/repository/init/common'; export interface BaseBranchCache { sha: string; // branch commit sha @@ -13,11 +13,7 @@ export interface BaseBranchCache { export interface Cache { repository?: string; - init?: { - defaultBranchSha?: string; - repoConfig?: RepoFileConfig; - resolvedConfig?: RenovateConfig; - }; + init?: RepoInitConfig; scan?: Record<string, BaseBranchCache>; } diff --git a/lib/workers/repository/init/common.ts b/lib/workers/repository/init/common.ts index b57229f0ef..4424d679c2 100644 --- a/lib/workers/repository/init/common.ts +++ b/lib/workers/repository/init/common.ts @@ -1,3 +1,5 @@ +import { RenovateConfig } from '../../../config'; + export type RepoConfigError = { validationError: string; validationMessage: string; @@ -8,3 +10,9 @@ export interface RepoFileConfig { config?: any; error?: RepoConfigError; } + +export interface RepoInitConfig { + defaultBranchSha?: string; + repoConfig?: RepoFileConfig; + resolvedConfig?: RenovateConfig; +} -- GitLab