chore: enforce conventional commits and lint via commitlint #788
7 .commitlintrc.json Normal file
7
.commitlintrc.json Normal file @@ -0,0 +1,7 @@ | ||||
{ | ||||
"extends": ["@commitlint/config-conventional"], | ||||
"rules": { | ||||
"type-enum": [2, "always", ["feat", "fix", "chore", "docs", "style", "refactor", "test", "perf", "ci", "WIP"]], | ||||
"type-case": [0, "always", "lower-case"] | ||||
} | ||||
} | ||||
16 .gitea/workflows/commitlint.yml Normal file
16
.gitea/workflows/commitlint.yml Normal file @@ -0,0 +1,16 @@ | ||||
name: commitlint | ||||
| ||||
on: | ||||
pull_request: | ||||
branches: | ||||
- "*" | ||||
| ||||
jobs: | ||||
check-and-test: | ||||
runs-on: ubuntu-latest | ||||
container: commitlint/commitlint:19.7.1 | ||||
steps: | ||||
- uses: actions/checkout@v4 | ||||
- name: check PR title | ||||
run: | | ||||
echo "${{ gitea.event.pull_request.title }}" | commitlint --config .commitlintrc.json | ||||
@@ -29,6 +29,7 @@ When submitting or updating a PR: | ||||
- try to avoid rebases. They make code reviews for large PRs and comments much harder. | ||||
- if applicable, use the PR template for a well-defined PR description. | ||||
- clearly mark breaking changes. | ||||
- format the PR title following the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/#specification) schema | ||||
| ||||
## Local development & testing | ||||
| ||||
| ||||
Reference in New Issue
Block a user