Enable commitlint for pull requests and commits (#11410)

* Enable commitlint for pull requests and commits

Refer to https://commitlint.js.org/#/reference-rules for rules
This commit is contained in:
Tulio Leao 2020-05-01 21:04:06 -03:00 committed by GitHub
parent c4a31ec236
commit 4a8df6d322
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 82 additions and 0 deletions

68
.commitlint.json Normal file
View File

@ -0,0 +1,68 @@
{
"rules": {
"body-leading-blank": [
2,
"always"
],
"body-max-length": [
0
],
"body-min-length": [
0
],
"footer-leading-blank": [
2,
"always"
],
"footer-max-length": [
0
],
"footer-min-length": [
0
],
"header-max-length": [
2,
"always",
72
],
"header-min-length": [
2,
"always",
10
],
"scope-empty": [
0
],
"subject-case": [
0
],
"subject-empty": [
0
],
"subject-full-stop": [
0
],
"subject-max-length": [
0
],
"subject-min-length": [
0
],
"type-case": [
0
],
"type-empty": [
0
],
"type-enum": [
0
],
"type-max-length": [
0
],
"type-min-length": [
0
]
}
}

View File

@ -6,6 +6,20 @@ env:
BACKTRACE_IO_TOKEN: ${{ secrets.BACKTRACE_IO_TOKEN }}
OPENRCT2_VERSION: 0.2.6
jobs:
lint-commit:
name: Lint Commit Message
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Lint Commit Messages
uses: wagoid/commitlint-github-action@v1
with:
configFile: .commitlint.json
check-code-formatting:
name: Check code formatting
runs-on: ubuntu-latest