From: Thanh Ha Date: Tue, 28 Jan 2020 15:39:05 +0000 (-0500) Subject: Add GitLint which replaces GitCommitBear X-Git-Tag: v0.4.2~2 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=aa2f7d7fc3310637f350c9f1b6fe115f99bcedbe;p=releng%2Fcommon-packer.git Add GitLint which replaces GitCommitBear The GitCommitBear was removed via I8d782822ca87add9108a044fd6e19b1c23686717 this replaces it with GitLint which does similar linting for git commit messages. Issue: RELENG-2642 Signed-off-by: Thanh Ha Change-Id: I6e47db45a6c5c519ee795adf15c4243fb0bfb6dd --- diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 047fc32..6a43c26 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,6 +10,11 @@ repos: hooks: - id: prettier + - repo: https://github.com/jorisroovers/gitlint + rev: v0.12.0 + hooks: + - id: gitlint + - repo: https://github.com/jumanjihouse/pre-commit-hooks rev: 1.11.2 hooks: diff --git a/tox.ini b/tox.ini index 5bff9ee..5f647f2 100644 --- a/tox.ini +++ b/tox.ini @@ -21,8 +21,8 @@ commands = sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinid basepython = python3 deps = pre-commit commands = - pre-commit install pre-commit run --all-files + pre-commit run gitlint --hook-stage commit-msg --commit-msg-filename .git/COMMIT_EDITMSG [testenv:reno] basepython = python3