assignPassFailToPR(lhr, thresholds, opts) {
    const scores = LighthouseCI.getOverallScores(lhr);

    let passing = true;
    const scoresStr = [];

    for (const [cat, score] of Object.entries(scores)) {
      if (cat in thresholds) {
        const minScore = thresholds[cat];
        if (minScore > Math.round(score)) {
          passing = false;
        }
        scoresStr.push(`${cat}:${minScore}`);
      }
    }

    let description = `Failed. Required scores: ${scoresStr.join(',')}.`;
    if (passing) {
      description = 'Passed. Lighthouse scores meet thresholds.';
    }

    const status = Object.assign({
      description,
      state: passing ? 'success' : 'failure'
    }, opts);

    // eslint-disable-next-line no-unused-vars
    return this.updateGithubStatus(status).then(status => scores);
  }
Updates pass/fail state of PR.
@param {!Object} lhr Lighthouse results object.
@param {!Object<string, number>} thresholds Minimum scores per category.
@param {!Object} opts Options to set the status with.
@return {!Promise<number>} Overall lighthouse score.