opentofu / registry

The all-new opentofu.org registry!
https://search.opentofu.org
Apache License 2.0
329 stars 40 forks source link

Check for valid JSON on PRs #152

Closed ghost closed 10 months ago

ghost commented 10 months ago

Description of the feature you are looking for.

On auto-generated PRs we still should check for valid JSON in case manual edits were necessary, see #147

kislerdm commented 10 months ago

@janosdebugs Hey Janos, I'd be happy to give a hand with this issue this week. Are there any particular implementation restrictions to be mindful about?

ghost commented 10 months ago

Hey @kislerdm this should check if the JSON is formally valid, as well as being readable by the registry. The main intent is that if we manually need to edit the JSON (artisanal JSON), we should be prevented from merging a broken JSON as it would cause further issues.

kislerdm commented 10 months ago

@janosdebugs thanks for clarification! What is the condition for "being readable by the registry", does it mean validation against specific json schemas?

Also, are there any specific conditions to trigger the validation? For example, trigger only if changes are pushed to the branches which are prefixed with module-submission_*, or provider-submission_*?

Thanks!