async componentDidUpdate()

in src/PrDisplay.js [218:239]


  async componentDidUpdate(prevProps, prevState) {
    if (this.hasError()) {
      return;
    }
    for (const run of this.state.runs) {
      for (const check of run.checkRuns.nodes) {
        if (!check.log.shown || check.log.text !== null) {
          continue;
        }

        github
          .raw(
            `repos/${this.props.user}/${this.props.repo}/actions/jobs/${check.databaseId}/logs`
          )
          .then((log) => log.text())
          .then((log) => {
            check.log.text = log;
            this.setState(this.state);
          });
      }
    }
  }