Skip to content

Commit

Permalink
Add Mergify schema and hook to catalog
Browse files Browse the repository at this point in the history
resolves #487
  • Loading branch information
sirosen committed Oct 2, 2024
1 parent d8fd281 commit f4ea396
Show file tree
Hide file tree
Showing 6 changed files with 1,586 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,22 @@
files: ^.*\.gitlab-ci\.yml$
types: [yaml]

# this hook is autogenerated from a script
# to modify this hook, update `src/check_jsonschema/catalog.py`
# and run `make generate-hooks` or `tox run -e generate-hooks-config`
- id: check-mergify
name: Validate Mergify config
description: 'Validate Mergify config against the schema provided by SchemaStore'
entry: check-jsonschema --builtin-schema vendor.mergify
language: python
files: >
(?x)^(
\.mergify\.yml|
\.mergify/config\.yml|
\.github/mergify\.yml
)$
types: [yaml]

# this hook is autogenerated from a script
# to modify this hook, update `src/check_jsonschema/catalog.py`
# and run `make generate-hooks` or `tox run -e generate-hooks-config`
Expand Down
14 changes: 14 additions & 0 deletions docs/precommit_usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,20 @@ Validate GitLab CI config against the schema provided by SchemaStore
- id: check-gitlab-ci
``check-mergify``
~~~~~~~~~~~~~~~~~

Validate Mergify config against the schema provided by SchemaStore

.. code-block:: yaml
:caption: example config
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.29.3
hooks:
- id: check-mergify
``check-readthedocs``
~~~~~~~~~~~~~~~~~~~~~

Expand Down
1 change: 1 addition & 0 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ SchemaStore and other sources:
- ``vendor.github-actions``
- ``vendor.github-workflows``
- ``vendor.gitlab-ci``
- ``vendor.mergify``
- ``vendor.readthedocs``
- ``vendor.renovate``
- ``vendor.taskfile``
Expand Down
Loading

0 comments on commit f4ea396

Please sign in to comment.