Skip to content

Commit 409bab5

Browse files
authored
Update gitlab and renovate hooks to 'nonunicode' (#519)
resolves #516, #518
1 parent df2b362 commit 409bab5

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

.pre-commit-hooks.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@
158158
- id: check-gitlab-ci
159159
name: Validate GitLab CI config
160160
description: 'Validate GitLab CI config against the schema provided by SchemaStore'
161-
entry: check-jsonschema --builtin-schema vendor.gitlab-ci --data-transform gitlab-ci
161+
entry: check-jsonschema --builtin-schema vendor.gitlab-ci --data-transform gitlab-ci --regex-variant nonunicode
162162
language: python
163163
files: ^.*\.gitlab-ci\.yml$
164164
types: [yaml]
@@ -196,7 +196,7 @@
196196
- id: check-renovate
197197
name: Validate Renovate Config
198198
description: 'Validate Renovate config against the schema provided by Renovate (does not support renovate config in package.json)'
199-
entry: check-jsonschema --builtin-schema vendor.renovate
199+
entry: check-jsonschema --builtin-schema vendor.renovate --regex-variant nonunicode
200200
language: python
201201
files: >
202202
(?x)^(

CHANGELOG.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ Unreleased
1111
.. vendor-insert-here
1212
1313
- Update vendored schemas (2025-01-26)
14+
- Update the ``gitlab`` and ``renovate`` hooks to use
15+
``--regex-variant nonunicode``. Thanks :user:`quentin-ag` and :user:`Callek`
16+
for reporting! (:issue:`516`, :issue:`518`)
1417

1518
0.31.0
1619
------

src/check_jsonschema/catalog.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,12 @@ def _githubusercontent_url(owner: str, repo: str, ref: str, path: str) -> str:
156156
),
157157
"hook_config": {
158158
"name": "Validate GitLab CI config",
159-
"add_args": ["--data-transform", "gitlab-ci"],
159+
"add_args": [
160+
"--data-transform",
161+
"gitlab-ci",
162+
"--regex-variant",
163+
"nonunicode",
164+
],
160165
"files": r"^.*\.gitlab-ci\.yml$",
161166
"types": "yaml",
162167
},
@@ -198,6 +203,7 @@ def _githubusercontent_url(owner: str, repo: str, ref: str, path: str) -> str:
198203
"Validate Renovate config against the schema provided by "
199204
"Renovate (does not support renovate config in package.json)"
200205
),
206+
"add_args": ["--regex-variant", "nonunicode"],
201207
"files": [
202208
r"renovate\.(json|json5)",
203209
r"\.(github|gitlab)/renovate\.(json|json5)",

0 commit comments

Comments
 (0)