diff --git a/lib/platform/azure/index.ts b/lib/platform/azure/index.ts index a9ed8ed84c0d246ebccc1193780aa3b72fe1e72d..9516f6e1102738333843c15e8693407bfd43dbb1 100644 --- a/lib/platform/azure/index.ts +++ b/lib/platform/azure/index.ts @@ -26,6 +26,7 @@ import { EnsureIssueResult, FindPRConfig, Issue, + PlatformParams, PlatformResult, Pr, RepoParams, @@ -65,7 +66,7 @@ export function initPlatform({ token, username, password, -}: RenovateConfig): Promise<PlatformResult> { +}: PlatformParams): Promise<PlatformResult> { if (!endpoint) { throw new Error('Init: You must configure an Azure DevOps endpoint'); } diff --git a/lib/platform/bitbucket-server/index.ts b/lib/platform/bitbucket-server/index.ts index deee43b86ceb491a805c73ed74d64c6a4f9f8c7e..aaa2c45fe76c041f188086278e7f54f69ae8e60c 100644 --- a/lib/platform/bitbucket-server/index.ts +++ b/lib/platform/bitbucket-server/index.ts @@ -29,6 +29,7 @@ import { EnsureIssueResult, FindPRConfig, Issue, + PlatformParams, PlatformResult, Pr, RepoParams, @@ -68,7 +69,7 @@ export function initPlatform({ endpoint, username, password, -}: RenovateConfig): Promise<PlatformResult> { +}: PlatformParams): Promise<PlatformResult> { if (!endpoint) { throw new Error('Init: You must configure a Bitbucket Server endpoint'); } diff --git a/lib/platform/bitbucket/index.ts b/lib/platform/bitbucket/index.ts index 2d5de5c4500168928b0bea44f47eceb03c193c22..a9b583b8c0f43e6aad962b21a6d208e7ad8e477f 100644 --- a/lib/platform/bitbucket/index.ts +++ b/lib/platform/bitbucket/index.ts @@ -23,6 +23,7 @@ import { EnsureIssueResult, FindPRConfig, Issue, + PlatformParams, PlatformResult, Pr, RepoParams, @@ -46,7 +47,7 @@ export function initPlatform({ endpoint, username, password, -}: RenovateConfig): Promise<PlatformResult> { +}: PlatformParams): Promise<PlatformResult> { if (!(username && password)) { throw new Error( 'Init: You must configure a Bitbucket username and password' diff --git a/lib/platform/common.ts b/lib/platform/common.ts index 67101e142a1c4f3b6c65e1a4ceaabe3a7c5b169b..676d5a4094fac70bd600c1f851ff9f7a73815056 100644 --- a/lib/platform/common.ts +++ b/lib/platform/common.ts @@ -1,4 +1,3 @@ -import { RenovateConfig } from '../config/common'; import { BranchStatus, VulnerabilityAlert as _VulnerabilityAlert, @@ -6,6 +5,13 @@ import { export type VulnerabilityAlert = _VulnerabilityAlert; +export interface PlatformParams { + endpoint?: string; + token?: string; + username?: string; + password?: string; +} + export interface PlatformResult { endpoint: string; renovateUsername?: any; @@ -158,5 +164,5 @@ export interface Platform { requiredStatusChecks?: string[] | null ): Promise<BranchStatus>; getBranchPr(branchName: string): Promise<Pr | null>; - initPlatform(config: RenovateConfig): Promise<PlatformResult>; + initPlatform(config: PlatformParams): Promise<PlatformResult>; } diff --git a/lib/platform/gitlab/index.ts b/lib/platform/gitlab/index.ts index e8e53e59bd8ac910205b65c612926b1a83dd4246..1edbc5ad18b8f95fb26f8833d56fba538e48dd3e 100644 --- a/lib/platform/gitlab/index.ts +++ b/lib/platform/gitlab/index.ts @@ -32,6 +32,7 @@ import { EnsureIssueConfig, FindPRConfig, Issue, + PlatformParams, PlatformResult, Pr, RepoParams, @@ -76,10 +77,7 @@ let authorId: number; export async function initPlatform({ endpoint, token, -}: { - token: string; - endpoint: string; -}): Promise<PlatformResult> { +}: PlatformParams): Promise<PlatformResult> { if (!token) { throw new Error('Init: You must configure a GitLab personal access token'); }