mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-28 02:56:22 +00:00
ci: Add linter to make sure we use Conventional Commits
This will make it easier for us to write Changelogs for example. See https://www.conventionalcommits.org/en/v1.0.0. Also mentioned in the CONTRIBUTING.md Signed-off-by: Michael Vetter <jubalh@iodoru.org>
This commit is contained in:
23
.commitlintrc.json
Normal file
23
.commitlintrc.json
Normal file
@@ -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]
|
||||||
|
}
|
||||||
|
}
|
||||||
17
.github/workflows/commit-lint.yml
vendored
Normal file
17
.github/workflows/commit-lint.yml
vendored
Normal file
@@ -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
|
||||||
Reference in New Issue
Block a user