diff --git a/.commitlintrc.json b/.commitlintrc.json new file mode 100644 index 00000000..8c6c4297 --- /dev/null +++ b/.commitlintrc.json @@ -0,0 +1,23 @@ +{ + "extends": ["@commitlint/config-conventional"], + "rules": { + "type-enum": [ + 2, + "always", + [ + "feat", + "fix", + "docs", + "style", + "refactor", + "perf", + "tests", + "build", + "ci", + "chore", + "cleanup" + ] + ], + "subject-case": [0] + } +} diff --git a/.github/workflows/commit-lint.yml b/.github/workflows/commit-lint.yml new file mode 100644 index 00000000..c32dc3e8 --- /dev/null +++ b/.github/workflows/commit-lint.yml @@ -0,0 +1,17 @@ +name: "Commits" + +on: + pull_request: + branches: [master] + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + # Applies to all commits + fetch-depth: 0 + + - name: "Conventional Commits" + uses: wagoid/commitlint-github-action@v6