mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-13 15:36:25 +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> {
|
||||
await syncBranch(branchName);
|
||||
try {
|
||||
const { currentBranchSha, currentBranch } = config;
|
||||
const branches = await git.branch([
|
||||
'--remotes',
|
||||
'--verbose',
|
||||
'--contains',
|
||||
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 */ {
|
||||
checkForPlatformFailure(err);
|
||||
throw err;
|
||||
|
|
Loading…
Reference in a new issue