diff --git a/lib/platform/github/index.ts b/lib/platform/github/index.ts index b4000bbea0b8bb5ebf65c7cc6efd27c3f99efb16..d2e0c0e8c665f6cacf3754011baa32fd7134c5ca 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);