From aa2f7d7fc3310637f350c9f1b6fe115f99bcedbe Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Tue, 28 Jan 2020 10:39:05 -0500 Subject: [PATCH] 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 --- .pre-commit-config.yaml | 5 +++++ tox.ini | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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 -- 2.16.6