From ad064a97b29a65985db2a3a525bd565adf36c012 Mon Sep 17 00:00:00 2001 From: Daniel Farrell Date: Mon, 1 Feb 2021 17:42:27 -0500 Subject: [PATCH] Add git commit message linting As implemented and configured in other Submariner repos. Signed-off-by: Daniel Farrell --- .github/workflows/linting.yml | 11 +++++++++++ .gitlint | 9 +++++++++ 2 files changed, 20 insertions(+) create mode 100644 .gitlint diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 9e22a90..66bf6f0 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -19,6 +19,17 @@ jobs: with: commits: ${{ steps.get-pr-commits.outputs.commits }} + gitlint: + name: Commit Message(s) + runs-on: ubuntu-latest + steps: + - name: Check out the repository + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Run gitlint + run: make gitlint + markdown-link-check: name: Markdown Links (modified files) runs-on: ubuntu-latest diff --git a/.gitlint b/.gitlint new file mode 100644 index 0000000..6314f15 --- /dev/null +++ b/.gitlint @@ -0,0 +1,9 @@ +[general] +# body-is-missing: Allow commit messages with only a title +# body-min-length: Allow short body lines, like "Relates-to: #issue" +ignore=body-is-missing,body-min-length + +[ignore-by-body] +# Dependabot doesn't follow our conventions, unfortunately +regex=^Signed-off-by: dependabot\[bot\](.*) +ignore=all