Skip to content

Commit

Permalink
Merge pull request #427 from jrdnbradford/update-cloudbuild-entry
Browse files Browse the repository at this point in the history
Allow validation of Cloud Build `json` configs
  • Loading branch information
sirosen committed May 5, 2024
2 parents 9c3ed2e + 2e9a348 commit 3020104
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@
description: 'Validate Google Cloud Build config against the schema provided by SchemaStore'
entry: check-jsonschema --builtin-schema vendor.cloudbuild
language: python
files: ^cloudbuild\.(yml|yaml)$
types: [yaml]
files: ^cloudbuild\.(yml|yaml|json)$
types_or: [json,yaml]

# this hook is autogenerated from a script
# to modify this hook, update `src/check_jsonschema/catalog.py`
Expand Down
8 changes: 6 additions & 2 deletions src/check_jsonschema/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,12 @@ def _githubusercontent_url(owner: str, repo: str, ref: str, path: str) -> str:
"url": "https://json.schemastore.org/cloudbuild.json",
"hook_config": {
"name": "Validate Google Cloud Build config",
"files": r"^cloudbuild\.(yml|yaml)$",
"types": "yaml",
"description": (
"Validate Google Cloud Build config against the schema provided "
"by SchemaStore"
),
"files": r"^cloudbuild\.(yml|yaml|json)$",
"types_or": ["json", "yaml"],
},
},
"dependabot": {
Expand Down

0 comments on commit 3020104

Please sign in to comment.