mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-14 08:36:26 +00:00
fix(git): add debug (#9683)
This commit is contained in:
parent
c542cbe7f5
commit
00cb277bb6
1 changed files with 7 additions and 1 deletions
|
@ -450,13 +450,19 @@ export function getBranchList(): string[] {
|
||||||
export async function isBranchStale(branchName: string): Promise<boolean> {
|
export async function isBranchStale(branchName: string): Promise<boolean> {
|
||||||
await syncBranch(branchName);
|
await syncBranch(branchName);
|
||||||
try {
|
try {
|
||||||
|
const { currentBranchSha, currentBranch } = config;
|
||||||
const branches = await git.branch([
|
const branches = await git.branch([
|
||||||
'--remotes',
|
'--remotes',
|
||||||
'--verbose',
|
'--verbose',
|
||||||
'--contains',
|
'--contains',
|
||||||
config.currentBranchSha,
|
config.currentBranchSha,
|
||||||
]);
|
]);
|
||||||
return !branches.all.map(localName).includes(branchName);
|
const isStale = !branches.all.map(localName).includes(branchName);
|
||||||
|
logger.debug(
|
||||||
|
{ isStale, branches, currentBranch, currentBranchSha },
|
||||||
|
`IsBranchStale=${isStale}`
|
||||||
|
);
|
||||||
|
return isStale;
|
||||||
} catch (err) /* istanbul ignore next */ {
|
} catch (err) /* istanbul ignore next */ {
|
||||||
checkForPlatformFailure(err);
|
checkForPlatformFailure(err);
|
||||||
throw err;
|
throw err;
|
||||||
|
|
Loading…
Reference in a new issue