diff --git a/lib/platform/github/index.js b/lib/platform/github/index.js index 6f8b494bab19c3791034b8e48f7bbc254d3041e9..f447fc5079f4e2d2202023d46c63e591963ae80a 100644 --- a/lib/platform/github/index.js +++ b/lib/platform/github/index.js @@ -232,6 +232,9 @@ async function initRepo({ } ); } + if (!await branchExists('renovate-config')) { + await createBranch('renovate-config', config.baseCommitSHA); + } } return platformConfig; } @@ -769,10 +772,6 @@ async function createPr( // istanbul ignore if if (config.mirrorMode && branchName === 'renovate/configure') { logger.debug('Using renovate-config as base branch for mirror config'); - if (!await branchExists('renovate-config')) { - const baseCommitSHA = await getBaseCommitSHA(); - await createBranch('renovate-config', baseCommitSHA); - } base = 'renovate-config'; } // Include the repository owner to handle forkMode and regular mode