chore: enforce conventional commits and lint via commitlint
(#788)
Co-authored-by: pat-s <patrick.schratz@gmail.com> Co-committed-by: pat-s <patrick.schratz@gmail.com>
This commit is contained in:
parent
8bf5b2104d
commit
d8f155562b
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.
|
- 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.
|
- if applicable, use the PR template for a well-defined PR description.
|
||||||
- clearly mark breaking changes.
|
- 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
|
## Local development & testing
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user