OpenTermsArchive / engine

Tracks contractual documents and exposes changes to the terms of online services.
https://opentermsarchive.org
European Union Public License 1.2
111 stars 30 forks source link

GitHub issue created does not contain `url` anymore #945

Closed martinratinaud closed 2 years ago

martinratinaud commented 2 years ago

It seems since the merge of multiple pages, an existing value location on documentDeclaration does not exist anymore

async onInaccessibleContent(error, serviceId, type, documentDeclaration) {
    const { location, contentSelectors, noiseSelectors } = documentDeclaration;

    const { title, body } = Tracker.formatIssueTitleAndBody({
      contentSelectors,
      noiseSelectors,
      url: location,
      name: serviceId,
      documentType: type,
      message: error.toString(),
      repository: this.repository,
    });

    await this.createIssueIfNotExists({
      title,
      body,
      labels: [this.label.name],
      comment: '🤖 Reopened automatically as an error occured',
    });
  }

This leads to unuseable URLs in Github issues

This is because location is now handled in pageDeclaration