Skip to content
Permalink
Browse files
fix(gitlab): check for unexpected branch statuses (#11669)
  • Loading branch information
rarkins committed Sep 10, 2021
1 parent c8ba6d9 commit 19b93110374cba0f32aa4e591d066b12780da9cb
Showing with 8 additions and 0 deletions.
  1. +8 −0 lib/platform/gitlab/index.ts
@@ -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');

0 comments on commit 19b9311

Please sign in to comment.