diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b3d9e29cb610..0e6f81741874 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -89,7 +89,9 @@ jobs: key: ${{ runner.os }}-${{ matrix.python-version }}-poetry-${{ hashFiles('**/poetry.lock') }} - name: Run pre-commit - run: pre-commit run --all-files + run: | + pre-commit run --hook-stage manual gitlint-ci + pre-commit run --all-files - name: Install Redis (macOS) if: runner.os == 'macOS' diff --git a/.gitlint b/.gitlint new file mode 100644 index 000000000000..967e03a134de --- /dev/null +++ b/.gitlint @@ -0,0 +1,8 @@ +[general] +ignore=body-is-missing,body-min-length + +[title-max-length] +line-length=80 + +[title-min-length] +min-length=5 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 74970264a39c..38e3d3056888 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -24,6 +24,12 @@ repos: - id: check-xml - id: check-yaml + - repo: https://github.com/jorisroovers/gitlint + rev: v0.19.1 + hooks: + - id: gitlint + - id: gitlint-ci + - repo: https://github.com/codespell-project/codespell rev: v2.2.6 hooks: