code: async function getBranchStatus(branchName, requiredStatusChecks) {
    logger.debug(`getBranchStatus(${branchName})`);
    if (!requiredStatusChecks) {
      // null means disable status checks, so it always succeeds
      logger.debug('Status checks disabled = returning "success"');
      return 'success';
    }
    if (requiredStatusChecks.length) {
      // This is Unsupported
      logger.warn({ requiredStatusChecks }, `Unsupported requiredStatusChecks`);
      return 'failed';
    }
    const sha = await getBranchCommit(branchName);
    const statuses = await utils.accumulateValues(
      `/2.0/repositories/${config.repository}/commit/${sha}/statuses`
    );
    const noOfFailures = statuses.filter(status => status.state === 'FAILED')
      .length;
    logger.debug(
      { branch: branchName, sha, statuses },
      'branch status check result'
    );
    if (noOfFailures) {
      return 'failed';
    }
    return 'success';
  }
docs: Returns the combined status for a branch.