code: async function getBranchStatus(branchName, requiredStatusChecks) {
    logger.debug(`getBranchStatus(${branchName})`);
    if (!requiredStatusChecks) {
      // null means disable status checks, so it always succeeds
      return 'success';
    }
    if (requiredStatusChecks.length) {
      // This is Unsupported
      logger.warn({ requiredStatusChecks }, `Unsupported requiredStatusChecks`);
      return 'failed';
    }
    // First, get the branch commit SHA
    const branchSha = await config.storage.getBranchCommit(branchName);
    // Now, check the statuses for that commit
    const url = `projects/${
      config.repository
    }/repository/commits/${branchSha}/statuses`;
    const res = await get(url);
    logger.debug(`Got res with ${res.body.length} results`);
    if (res.body.length === 0) {
      // Return 'pending' if we have no status checks
      return 'pending';
    }
    let status = 'success';
    // Return 'success' if all are success
    res.body.forEach(check => {
      // If one is failed then don't overwrite that
      if (status !== 'failure') {
        if (!check.allow_failure) {
          if (check.status === 'failed') {
            status = 'failure';
          } else if (check.status !== 'success') {
            ({ status } = check);
          }
        }
      }
    });
    return status;
  }
docs: Returns the combined status for a branch.