Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Mergify schema + hook #492

Merged
merged 3 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading