Skip to content

A pre-commit hook that lints Gitlab CI configurations

License

Notifications You must be signed in to change notification settings

kadrach/pre-commit-gitlabci-lint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pre-commit-gitlabci-lint

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.

Usage

GitLab Lint API now requires authorization.

  1. Create Access Token with api scope.
  2. 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"]

About

A pre-commit hook that lints Gitlab CI configurations

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages