From 2b47117fc78e71680755d580b23debb3fa1c4238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Tue, 26 May 2020 16:53:15 +0200 Subject: [PATCH] bot: add commitlint gh action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We now use a github action to perform commit linting instead of the old deprecated commitlint bot. Closes: https://github.com/rook/rook/issues/5547 Signed-off-by: Sébastien Han --- .commitlintrc.json | 33 ++++++++++++++++++++++++++++++++ .github/workflows/commitlint.yml | 16 ++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 .commitlintrc.json create mode 100644 .github/workflows/commitlint.yml diff --git a/.commitlintrc.json b/.commitlintrc.json new file mode 100644 index 000000000..03a4392a0 --- /dev/null +++ b/.commitlintrc.json @@ -0,0 +1,33 @@ +{ + "extends": [ + "@commitlint/config-conventional" + ], + "rules": { + "type-enum": [ + 2, + "always", + [ + "build", + "bot", + "cassandra", + "ceph", + "ci", + "cockroachdb", + "core", + "docs", + "edgefs", + "nfs", + "test", + "yugabytedb" + ] + ], + "body-leading-blank": [ + 2, + "always" + ], + "footer-leading-blank": [ + 2, + "always" + ] + } +} \ No newline at end of file diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml new file mode 100644 index 000000000..07cc07d4d --- /dev/null +++ b/.github/workflows/commitlint.yml @@ -0,0 +1,16 @@ +name: Commitlint +on: [push, pull_request] + +jobs: + lint: + runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: wagoid/commitlint-github-action@v1.6.0 + with: + configFile: './.commitlintrc.json' + helpURL: https://rook.io/docs/rook/master/development-flow.html#commit-structure