From 1bc2c93b054407ed3e1a0ad17fbd893dbedbd044 Mon Sep 17 00:00:00 2001 From: Mathias Rasmussen Date: Wed, 14 Oct 2020 23:18:51 +0200 Subject: [PATCH] ci: Commit lint --- .github/workflows/commitlint.config.js | 6 ++++++ .github/workflows/commitlint.yml | 13 +++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 .github/workflows/commitlint.config.js create mode 100644 .github/workflows/commitlint.yml diff --git a/.github/workflows/commitlint.config.js b/.github/workflows/commitlint.config.js new file mode 100644 index 0000000..57dda6f --- /dev/null +++ b/.github/workflows/commitlint.config.js @@ -0,0 +1,6 @@ +module.exports = { + extends: ['@commitlint/config-conventional'], + rules: { + 'subject-case': [ 2, 'always', ['sentence-case'] ], + } +}; diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml new file mode 100644 index 0000000..9179cdb --- /dev/null +++ b/.github/workflows/commitlint.yml @@ -0,0 +1,13 @@ +name: Lint Commit Messages +on: [pull_request] + +jobs: + commitlint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: wagoid/commitlint-github-action@v2 + with: + configFile: .github/workflows/commitlint.config.js