diff --git a/lib/platform/github/index.ts b/lib/platform/github/index.ts index b4000bbea0..d2e0c0e8c6 100644 --- a/lib/platform/github/index.ts +++ b/lib/platform/github/index.ts @@ -308,6 +308,16 @@ export async function initRepo({ }); config.repository = forkedRepo.body.full_name; config.forkDefaultBranch = forkedRepo.body.default_branch; + // istanbul ignore if + if (config.forkDefaultBranch !== config.defaultBranch) { + logger.debug( + { + defaultBranch: config.defaultBranch, + forkDefaultBranch: config.forkDefaultBranch, + }, + 'Fork has different default branch to parent' + ); + } } catch (err) /* istanbul ignore next */ { logger.debug({ err }, 'Error forking repository'); throw new Error(REPOSITORY_CANNOT_FORK);