From 517851434d20b59f18de0cbf6433bfc502a8b24e Mon Sep 17 00:00:00 2001 From: Antonio Spadaro <9268789+ilovelinux@users.noreply.github.com> Date: Tue, 2 Sep 2025 11:42:14 +0200 Subject: [PATCH 1/3] Add support for .gitlab-ci.yaml files --- .pre-commit-hooks.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 80da2c0c6..6d1790c6b 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -160,7 +160,7 @@ description: 'Validate GitLab CI config against the schema provided by SchemaStore' entry: check-jsonschema --builtin-schema vendor.gitlab-ci --data-transform gitlab-ci --regex-variant nonunicode language: python - files: ^.*\.gitlab-ci\.yml$ + files: ^.*\.gitlab-ci\.(yml|yaml)$ types: [yaml] # this hook is autogenerated from a script From 79364048dd30b7f17ed4732acb9e3b1d0057bda7 Mon Sep 17 00:00:00 2001 From: Antonio Spadaro <9268789+ilovelinux@users.noreply.github.com> Date: Mon, 15 Sep 2025 14:15:52 +0200 Subject: [PATCH 2/3] Add correct regex to catalog --- src/check_jsonschema/catalog.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/check_jsonschema/catalog.py b/src/check_jsonschema/catalog.py index f98ceb6b2..0a59c1e9d 100644 --- a/src/check_jsonschema/catalog.py +++ b/src/check_jsonschema/catalog.py @@ -162,7 +162,7 @@ def _githubusercontent_url(owner: str, repo: str, ref: str, path: str) -> str: "--regex-variant", "nonunicode", ], - "files": r"^.*\.gitlab-ci\.yml$", + "files": r"^.*\.gitlab-ci\.(yml|yaml)$", "types": "yaml", }, }, From cd3362f992fc4d26b2d72fc4da8b6d02d8452592 Mon Sep 17 00:00:00 2001 From: Antonio Spadaro <9268789+ilovelinux@users.noreply.github.com> Date: Mon, 15 Sep 2025 14:20:38 +0200 Subject: [PATCH 3/3] Fix tests --- tests/acceptance/test_hook_file_matches.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/acceptance/test_hook_file_matches.py b/tests/acceptance/test_hook_file_matches.py index 918ed315b..bc9403848 100644 --- a/tests/acceptance/test_hook_file_matches.py +++ b/tests/acceptance/test_hook_file_matches.py @@ -138,9 +138,9 @@ def get_hook_config(hookid): ".gitlab-ci.yml", ".gitlab/.gitlab-ci.yml", "gitlab/.gitlab-ci.yml", + ".gitlab-ci.yaml", ), "bad": ( - ".gitlab-ci.yaml", "gitlab-ci.yml", ".gitlab/gitlab-ci.yml", "gitlab/gitlab-ci.yml",