Commit d9df78ce authored by Nimrod Adar's avatar Nimrod Adar
Browse files

ci-fairy: add pre-commit hooks.



ci-fairy hooks for pre-commit.
Signed-off-by: Nimrod Adar's avatarAdar Nimrod <nimrod@shore.co.il>
parent 290b79e0
Pipeline #291559 passed with stages
in 1 minute and 10 seconds
---
- id: lint
name: Lint gitlab-ci.yml
language: python
entry: ci-fairy
args: ["lint"]
types: ["yaml"]
files: \.gitlab-ci\.yml
pass_filenames: false
- id: check-commits
name: Check a commit range
language: python
entry: ci-fairy
args: ["check-commits", "master..HEAD"]
always_run: true
stages: ["push"]
......@@ -104,6 +104,24 @@ GitLab has an online linter but it requires copy/pasting the
linter** and print any errors.
.. _ci-fairy-pre-commit:
pre-commit
----------
You can incorperate the ci-fairy lint check in your `pre-commit
<https://pre-commit.com/>`_ setup. Add the following snippet to your
``.pre-commit-config.yaml``
.. code-block:: yaml
- repo: https://gitlab.freedesktop.org/freedesktop/ci-templates.git
rev: master
hooks:
- id: lint
stages: ["push"] # By default runs on every commit, change to suit your workflow.
- id: check-commits
.. _ci-fairy-deleting-images:
Deleting registry images
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment