From 2c99415ec3ecaff227b1127755a86765d662238a Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@arkins.net> Date: Tue, 11 Aug 2020 16:03:34 +0200 Subject: [PATCH] fix(github): use forkToken for deleting the fork --- lib/platform/github/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/platform/github/index.ts b/lib/platform/github/index.ts index f2485158d8..1848300e00 100644 --- a/lib/platform/github/index.ts +++ b/lib/platform/github/index.ts @@ -366,7 +366,9 @@ export async function initRepo({ 'Error updating fork reference - will try deleting fork to try again next time' ); try { - await githubApi.deleteJson(`repos/${config.repository}`); + await githubApi.deleteJson(`repos/${config.repository}`, { + token: forkToken || opts.token, + }); logger.info('Fork deleted'); } catch (deleteErr) { logger.warn({ err: deleteErr }, 'Could not delete fork'); -- GitLab