README.md

EdgeCenter Cloud Git hooks

1. commit-msg hook

The commit-msg hook takes one parameter, which again is the path to a temporary file that contains the commit message written by the developer. If this script exits non-zero, Git aborts the commit process.

This git hook, developed by the Cloud team, checks the commit message for compliance with the Conventional Commits format (see https://www.conventionalcommits.org)

How to implement it into your project?

Install pre-commit tools:

pip install pre-commit

Create (if it doesn’t exist) a .pre-commit-config.yaml file in the root of the project:

touch .pre-commit-config.yaml

Add this content to the created file:

  - repo: https://github.com/Edge-Center/edgecentercloud-git-hooks
    rev: v0.0.6
    hooks:
      - id: edgecenter-cloud-conventional-commit
        name: EdgeCenter Cloud Conventional Commit
        entry: edgecenter-cloud-conventional-commit
        language: python
        always_run: true
        stages: [ commit-msg ]

Install hook using this command:

pre-commit install --install-hooks

Complete!

Конвейеры
0 успешных
0 с ошибкой