mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 15:06:27 +00:00
fix(gitlab): check for unexpected branch statuses (#11669)
This commit is contained in:
parent
c8ba6d96f2
commit
19b9311037
1 changed files with 8 additions and 0 deletions
|
@ -389,6 +389,14 @@ export async function getBranchStatus(
|
|||
}
|
||||
|
||||
const branchStatuses = await getStatus(branchName);
|
||||
// istanbul ignore if
|
||||
if (!is.array(branchStatuses)) {
|
||||
logger.warn(
|
||||
{ branchName, branchStatuses },
|
||||
'Empty or unexpected branch statuses'
|
||||
);
|
||||
return BranchStatus.yellow;
|
||||
}
|
||||
logger.debug(`Got res with ${branchStatuses.length} results`);
|
||||
// ignore all skipped jobs
|
||||
const res = branchStatuses.filter((check) => check.status !== 'skipped');
|
||||
|
|
Loading…
Reference in a new issue