From 12f467af922789b6312c666bfc40349d5fe1399d Mon Sep 17 00:00:00 2001 From: Oleg Sigida <6461608+osigida@users.noreply.github.com> Date: Wed, 8 Dec 2021 15:36:09 +0100 Subject: [PATCH] chore: improve logging for stale branch rebase (#13009) Co-authored-by: Rhys Arkins <rhys@arkins.net> --- lib/util/git/index.ts | 1 + lib/workers/branch/reuse.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/util/git/index.ts b/lib/util/git/index.ts index c9130d1718..f714ff9149 100644 --- a/lib/util/git/index.ts +++ b/lib/util/git/index.ts @@ -556,6 +556,7 @@ export async function isBranchModified(branchName: string): Promise<boolean> { config.ignoredAuthors.some((ignoredAuthor) => lastAuthor === ignoredAuthor) ) { // author matches - branch has not been modified + logger.debug({ branchName }, 'Branch has not been modified'); config.branchIsModified[branchName] = false; return false; } diff --git a/lib/workers/branch/reuse.ts b/lib/workers/branch/reuse.ts index a114fd864f..00a9a062be 100644 --- a/lib/workers/branch/reuse.ts +++ b/lib/workers/branch/reuse.ts @@ -60,6 +60,7 @@ export async function shouldReuseExistingBranch( logger.debug('Cannot rebase branch as it has been modified'); return { reuseExistingBranch: true, isModified: true }; } + logger.debug('Branch is unmodified, so can be rebased'); return { reuseExistingBranch: false }; } logger.debug('Branch is up-to-date'); -- GitLab