Skip to content

Commit

Permalink
Merge pull request #492 from python-jsonschema/add-mergify
Browse files Browse the repository at this point in the history
Add Mergify schema + hook
  • Loading branch information
sirosen authored Oct 2, 2024
2 parents e81b0ff + 16d8c56 commit 067a89b
Show file tree
Hide file tree
Showing 9 changed files with 1,606 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
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Unreleased
- Fix the renovate hook to allow for `.renovaterc.json5` as well. Thanks
:user:`tpansino`! (:pr:`491`)
- Add Mergify schema and pre-commit hook. Thanks :user:`hofbi` and :user:`jd`
for the issue and feedback! (:issue:`487`)

0.29.3
------
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 067a89b

Please sign in to comment.