From ed11085f75670b8c7b23237f6d3ec5558d3524a1 Mon Sep 17 00:00:00 2001 From: Noorul Islam K M Date: Wed, 8 Mar 2023 16:25:42 +0530 Subject: [PATCH 1/2] Add support for dependabot.yaml file also Today check-dependabot only supports dependabot.yml files. Dependabot supports .dependabot.yaml files also. --- .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 1cc24ad2e..3ae228502 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -53,7 +53,7 @@ description: 'Validate Dependabot Config (v2) against the schema provided by SchemaStore' entry: check-jsonschema --builtin-schema vendor.dependabot language: python - files: ^\.github/dependabot.yml$ + files: ^\.github/dependabot.(yml|yaml)$ types: [yaml] - id: check-github-actions From 1ac659dae0d7d26688bfcd5751fdd381362b4df2 Mon Sep 17 00:00:00 2001 From: Noorul Islam K M Date: Wed, 8 Mar 2023 22:25:27 +0530 Subject: [PATCH 2/2] Updated test for check-dependabot file match --- tests/acceptance/test_hook_file_matches.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/acceptance/test_hook_file_matches.py b/tests/acceptance/test_hook_file_matches.py index a74a28ec3..59e9ebafa 100644 --- a/tests/acceptance/test_hook_file_matches.py +++ b/tests/acceptance/test_hook_file_matches.py @@ -64,8 +64,8 @@ def get_hook_config(hookid): ), }, "check-dependabot": { - "good": (".github/dependabot.yml",), - "bad": (".github/dependabot.yaml", ".dependabot.yml"), + "good": (".github/dependabot.yml", ".github/dependabot.yaml"), + "bad": (".dependabot.yaml", ".dependabot.yml"), }, "check-github-actions": { "good": (