Skip to content

Commit 3020104

Browse files
authored
Merge pull request python-jsonschema#427 from jrdnbradford/update-cloudbuild-entry
Allow validation of Cloud Build `json` configs
2 parents 9c3ed2e + 2e9a348 commit 3020104

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.pre-commit-hooks.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@
7676
description: 'Validate Google Cloud Build config against the schema provided by SchemaStore'
7777
entry: check-jsonschema --builtin-schema vendor.cloudbuild
7878
language: python
79-
files: ^cloudbuild\.(yml|yaml)$
80-
types: [yaml]
79+
files: ^cloudbuild\.(yml|yaml|json)$
80+
types_or: [json,yaml]
8181

8282
# this hook is autogenerated from a script
8383
# to modify this hook, update `src/check_jsonschema/catalog.py`

src/check_jsonschema/catalog.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,12 @@ def _githubusercontent_url(owner: str, repo: str, ref: str, path: str) -> str:
7474
"url": "https://json.schemastore.org/cloudbuild.json",
7575
"hook_config": {
7676
"name": "Validate Google Cloud Build config",
77-
"files": r"^cloudbuild\.(yml|yaml)$",
78-
"types": "yaml",
77+
"description": (
78+
"Validate Google Cloud Build config against the schema provided "
79+
"by SchemaStore"
80+
),
81+
"files": r"^cloudbuild\.(yml|yaml|json)$",
82+
"types_or": ["json", "yaml"],
7983
},
8084
},
8185
"dependabot": {

0 commit comments

Comments
 (0)