This is a pre-commit hook. Uses the /api/v4/ci/lint
lint endpoint to validate the contents of your .gitlab-ci.yml
file. By default, sends your configuration to https://gitlab.com, but this can be overridden, see below.
GitLab Lint API now requires authorization.
- Create Access Token with
api
scope. - Set access token value as
GITLAB_TOKEN
environment variable
Warning Please note the token should not be shared and if leaked can cause significant harm.
An example .pre-commit-config.yaml
:
---
repos:
- repo: https://github.com/kadrach/pre-commit-gitlabci-lint
rev: master
hooks:
- id: gitlabci-lint
# args: ["https://custom.gitlab.host.com"]