diff options
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/commitlint.config.js | 34 | ||||
-rw-r--r-- | .github/workflows/commitlint.yml | 15 |
2 files changed, 49 insertions, 0 deletions
diff --git a/.github/workflows/commitlint.config.js b/.github/workflows/commitlint.config.js new file mode 100644 index 00000000..2bc8d493 --- /dev/null +++ b/.github/workflows/commitlint.config.js @@ -0,0 +1,34 @@ +module.exports = { + rules: { + "body-leading-blank": [1, "always"], + "body-max-line-length": [2, "always", 100], + "footer-leading-blank": [1, "always"], + "footer-max-line-length": [2, "always", 100], + "header-max-length": [2, "always", 72], + "scope-case": [2, "always", "lower-case"], + "subject-case": [ + 2, + "never", + ["upper-case", "pascal-case", "sentence-case", "start-case"], + ], + "subject-empty": [2, "never"], + "subject-full-stop": [2, "never", "."], + "type-case": [2, "always", "lower-case"], + "type-empty": [2, "never"], + "type-enum": [ + 2, + "always", + [ + "build", + "ci", + "docs", + "feat", + "fix", + "perf", + "refactor", + "revert", + "test", + ], + ], + }, +}; diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml new file mode 100644 index 00000000..93c776e3 --- /dev/null +++ b/.github/workflows/commitlint.yml @@ -0,0 +1,15 @@ +name: "Commit Linter" +on: pull_request +jobs: + lint-commits: + runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/[email protected] + with: + fetch-depth: 0 + - uses: wagoid/commitlint-github-action@v4 + with: + configFile: .github/workflows/commitlint.config.js + helpURL: https://github.com/LunarVim/LunarVim/blob/rolling/CONTRIBUTING.md#commit-messages |