Skip to content

Commit 067a89b

Browse files
authored
Merge pull request #492 from python-jsonschema/add-mergify
Add Mergify schema + hook
2 parents e81b0ff + 16d8c56 commit 067a89b

File tree

9 files changed

+1606
-0
lines changed

9 files changed

+1606
-0
lines changed

.pre-commit-hooks.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,22 @@
148148
files: ^.*\.gitlab-ci\.yml$
149149
types: [yaml]
150150

151+
# this hook is autogenerated from a script
152+
# to modify this hook, update `src/check_jsonschema/catalog.py`
153+
# and run `make generate-hooks` or `tox run -e generate-hooks-config`
154+
- id: check-mergify
155+
name: Validate Mergify config
156+
description: 'Validate Mergify config against the schema provided by SchemaStore'
157+
entry: check-jsonschema --builtin-schema vendor.mergify
158+
language: python
159+
files: >
160+
(?x)^(
161+
\.mergify\.yml|
162+
\.mergify/config\.yml|
163+
\.github/mergify\.yml
164+
)$
165+
types: [yaml]
166+
151167
# this hook is autogenerated from a script
152168
# to modify this hook, update `src/check_jsonschema/catalog.py`
153169
# and run `make generate-hooks` or `tox run -e generate-hooks-config`

CHANGELOG.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Unreleased
1212
1313
- Fix the renovate hook to allow for `.renovaterc.json5` as well. Thanks
1414
:user:`tpansino`! (:pr:`491`)
15+
- Add Mergify schema and pre-commit hook. Thanks :user:`hofbi` and :user:`jd`
16+
for the issue and feedback! (:issue:`487`)
1517

1618
0.29.3
1719
------

docs/precommit_usage.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,20 @@ Validate GitLab CI config against the schema provided by SchemaStore
197197
- id: check-gitlab-ci
198198
199199
200+
``check-mergify``
201+
~~~~~~~~~~~~~~~~~
202+
203+
Validate Mergify config against the schema provided by SchemaStore
204+
205+
.. code-block:: yaml
206+
:caption: example config
207+
208+
- repo: https://github.com/python-jsonschema/check-jsonschema
209+
rev: 0.29.3
210+
hooks:
211+
- id: check-mergify
212+
213+
200214
``check-readthedocs``
201215
~~~~~~~~~~~~~~~~~~~~~
202216

docs/usage.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ SchemaStore and other sources:
9797
- ``vendor.github-actions``
9898
- ``vendor.github-workflows``
9999
- ``vendor.gitlab-ci``
100+
- ``vendor.mergify``
100101
- ``vendor.readthedocs``
101102
- ``vendor.renovate``
102103
- ``vendor.taskfile``

0 commit comments

Comments
 (0)