From cf42ed9674d208aeb59a801d2e339c3b59ea8c5b Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@arkins.net> Date: Wed, 14 Aug 2019 10:24:11 +0200 Subject: [PATCH] chore: remove unused privateRepo field --- lib/platform/azure/index.ts | 1 - lib/platform/bitbucket-server/index.ts | 1 - lib/platform/bitbucket/index.ts | 1 - lib/platform/bitbucket/utils.ts | 1 - lib/platform/common.ts | 1 - lib/platform/github/index.ts | 1 - test/platform/azure/__snapshots__/index.spec.ts.snap | 1 - .../bitbucket-server/__snapshots__/index.spec.ts.snap | 4 ---- test/platform/bitbucket/__snapshots__/index.spec.ts.snap | 1 - test/platform/github/__snapshots__/index.spec.ts.snap | 6 ------ 10 files changed, 18 deletions(-) diff --git a/lib/platform/azure/index.ts b/lib/platform/azure/index.ts index 8ad3fd9805..3c34c13911 100644 --- a/lib/platform/azure/index.ts +++ b/lib/platform/azure/index.ts @@ -122,7 +122,6 @@ export async function initRepo({ url, }); const repoConfig: RepoConfig = { - privateRepo: true, isFork: false, }; return repoConfig; diff --git a/lib/platform/bitbucket-server/index.ts b/lib/platform/bitbucket-server/index.ts index 3db6783c49..6aa0e78b1e 100644 --- a/lib/platform/bitbucket-server/index.ts +++ b/lib/platform/bitbucket-server/index.ts @@ -186,7 +186,6 @@ export async function initRepo({ const info = (await api.get( `./rest/api/1.0/projects/${config.projectKey}/repos/${config.repositorySlug}` )).body; - repoConfig.privateRepo = info.is_private; repoConfig.isFork = !!info.parent; config.owner = info.project.key; logger.debug(`${repository} owner = ${config.owner}`); diff --git a/lib/platform/bitbucket/index.ts b/lib/platform/bitbucket/index.ts index 48502dd9ff..b7d5310a3e 100644 --- a/lib/platform/bitbucket/index.ts +++ b/lib/platform/bitbucket/index.ts @@ -94,7 +94,6 @@ export async function initRepo({ } } - repoConfig.privateRepo = info.privateRepo; repoConfig.isFork = info.isFork; Object.assign(config, { diff --git a/lib/platform/bitbucket/utils.ts b/lib/platform/bitbucket/utils.ts index 710164f66c..44ed49d963 100644 --- a/lib/platform/bitbucket/utils.ts +++ b/lib/platform/bitbucket/utils.ts @@ -27,7 +27,6 @@ export interface PagedResult<T = any> { export function repoInfoTransformer(repoInfoBody: any) { return { - privateRepo: repoInfoBody.is_private, isFork: !!repoInfoBody.parent, owner: repoInfoBody.owner.username, mainbranch: repoInfoBody.mainbranch.name, diff --git a/lib/platform/common.ts b/lib/platform/common.ts index 3deb3174f0..57e8c5f3de 100644 --- a/lib/platform/common.ts +++ b/lib/platform/common.ts @@ -50,7 +50,6 @@ export interface RepoConfig { renovateUsername?: any; gitAuthor?: any; isFork: boolean; - privateRepo: boolean; } export interface RepoParams { diff --git a/lib/platform/github/index.ts b/lib/platform/github/index.ts index af9ceb0c3c..2c634ab00d 100644 --- a/lib/platform/github/index.ts +++ b/lib/platform/github/index.ts @@ -237,7 +237,6 @@ export async function initRepo({ throw new Error('disabled'); } } - repoConfig.privateRepo = res.body.private === true; repoConfig.isFork = res.body.fork === true; const owner = res.body.owner.login; logger.debug(`${repository} owner = ${owner}`); diff --git a/test/platform/azure/__snapshots__/index.spec.ts.snap b/test/platform/azure/__snapshots__/index.spec.ts.snap index 22cc6cb3c6..5dbe39b57a 100644 --- a/test/platform/azure/__snapshots__/index.spec.ts.snap +++ b/test/platform/azure/__snapshots__/index.spec.ts.snap @@ -136,7 +136,6 @@ Array [ exports[`platform/azure initRepo should initialise the config for a repo 2`] = ` Object { "isFork": false, - "privateRepo": true, } `; diff --git a/test/platform/bitbucket-server/__snapshots__/index.spec.ts.snap b/test/platform/bitbucket-server/__snapshots__/index.spec.ts.snap index 7a53c606cb..74bd003433 100644 --- a/test/platform/bitbucket-server/__snapshots__/index.spec.ts.snap +++ b/test/platform/bitbucket-server/__snapshots__/index.spec.ts.snap @@ -999,14 +999,12 @@ Object { exports[`platform/bitbucket-server endpoint with no path initRepo() does not throw 1`] = ` Object { "isFork": false, - "privateRepo": undefined, } `; exports[`platform/bitbucket-server endpoint with no path initRepo() works 1`] = ` Object { "isFork": false, - "privateRepo": undefined, } `; @@ -2473,14 +2471,12 @@ Object { exports[`platform/bitbucket-server endpoint with path initRepo() does not throw 1`] = ` Object { "isFork": false, - "privateRepo": undefined, } `; exports[`platform/bitbucket-server endpoint with path initRepo() works 1`] = ` Object { "isFork": false, - "privateRepo": undefined, } `; diff --git a/test/platform/bitbucket/__snapshots__/index.spec.ts.snap b/test/platform/bitbucket/__snapshots__/index.spec.ts.snap index 6e3c4958fa..fb3b687382 100644 --- a/test/platform/bitbucket/__snapshots__/index.spec.ts.snap +++ b/test/platform/bitbucket/__snapshots__/index.spec.ts.snap @@ -280,7 +280,6 @@ Object { exports[`platform/bitbucket initRepo() works 1`] = ` Object { "isFork": false, - "privateRepo": false, } `; diff --git a/test/platform/github/__snapshots__/index.spec.ts.snap b/test/platform/github/__snapshots__/index.spec.ts.snap index d1efba10c7..bf4e9e4ae0 100644 --- a/test/platform/github/__snapshots__/index.spec.ts.snap +++ b/test/platform/github/__snapshots__/index.spec.ts.snap @@ -415,42 +415,36 @@ Object { exports[`platform/github initRepo should forks when forkMode 1`] = ` Object { "isFork": false, - "privateRepo": false, } `; exports[`platform/github initRepo should merge 1`] = ` Object { "isFork": false, - "privateRepo": false, } `; exports[`platform/github initRepo should not guess at merge 1`] = ` Object { "isFork": false, - "privateRepo": false, } `; exports[`platform/github initRepo should rebase 1`] = ` Object { "isFork": false, - "privateRepo": false, } `; exports[`platform/github initRepo should squash 1`] = ` Object { "isFork": false, - "privateRepo": false, } `; exports[`platform/github initRepo should update fork when forkMode 1`] = ` Object { "isFork": false, - "privateRepo": false, } `; -- GitLab