OpenTermsArchive / engine

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

Fix script to test only modified documents + simplify use in CI #961

Closed martinratinaud closed 1 year ago

martinratinaud commented 1 year ago

A bug has been introduced in https://github.com/ambanum/OpenTermsArchive/pull/958 that causes modified declarations to not be passed to the validate function, data being a Set while code is awaiting an Array.

This cause the tool to validate all document types within the service instead of only the ones modified.

This PR solves this problem

It also changes the branch on which the diff is made to find out what document types were modified.

For now, the local main branch is used for the diff and in order to make this possible on CI, we need to add this line

By changing the diff branch from main to remotes/origin/main in the core, this would remove the need for this line.