marocchino / validate-dependabot

validate dependabot yaml

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JSON schema error while running action

annabalquin opened this issue · comments

On running the action, encountered the following error:

Error: no schema with key or ref "http://json-schema.org/draft-07/schema#"

Same: https://github.com/google/automotive-design-compose/actions/runs/6951328475/job/18913118404

GitHub
Automotive Design for Compose is an extension to Jetpack Compose that allows every screen, component, and overlay of your Android App to be defined in Figma, and lets you see the latest changes to ...

Same: https://github.com/shipmonk-rnd/doctrine-hint-driven-sql-walker/actions/runs/7044685714/job/19172875221?pr=6

GitHub
Doctrine's SqlWalker that allows hooking multiple handlers via ->setHint() while each can edit produced SQL or its part. - dependabot: add validation job · shipmonk-rnd/doctrine-hint-driven-...

We have the same issue in a private repo. I took some time today to investigate why this failure started happening.

So, it looks like a couple of weeks ago the dependabot-2.0 schema in the schemastore was updated to use the meta-schema draft-07 instead of the meta-schema draft-04: https://github.com/SchemaStore/schemastore/blame/224b17f25bca8843288f5cdca6de731cb6117924/src/schemas/json/dependabot-2.0.json#L3.

However, ajv version in this project is too old and doesn't support draft-07. I believe support for draft-07 was added in ajv version 6.

I created a pull request for a possible solution: #648

@marocchino could you please take a look at it when you have a chance? I haven’t touched JS in years, so feel free to modify the PR as needed if something is wrong, or close it and create another one, if a better fix is possible.