From 834c0488a3503e885405160cb37938f0a522a90b Mon Sep 17 00:00:00 2001 From: Birger Schacht Date: Thu, 4 Dec 2025 09:12:58 +0100 Subject: [PATCH] ci: add gitlint workflow --- .github/workflows/gitlint.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/gitlint.yml diff --git a/.github/workflows/gitlint.yml b/.github/workflows/gitlint.yml new file mode 100644 index 0000000..1acfbf1 --- /dev/null +++ b/.github/workflows/gitlint.yml @@ -0,0 +1,23 @@ +#SPDX-FileCopyrightText: 2025 Birger Schacht +#SPDX-License-Identifier: MIT +name: Run gitlint + +on: + pull_request: + +jobs: + gitlint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + with: + fetch-depth: 0 + - name: Extract branch name + run: echo "GIT_BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_ENV + - name: Install gitlint + run: sudo apt-get -y install gitlint + - name: Run gitlint + # We ignore: + # B6: body-is-missing + # B5: body-min-length + run: gitlint -c body-max-line-length.line-length=120 --fail-without-commits --contrib contrib-title-conventional-commits --ignore B6,B5 --commits origin/main..origin/$GIT_BRANCH