ci: add commitlint action
All checks were successful
Go / build (1.23) (pull_request) Successful in 17s
Go / build (1.24) (pull_request) Successful in 15s
Go / build (1.22) (pull_request) Successful in 20s
Lint PR / commitlint (pull_request) Successful in 18s
Go / build (1.22) (push) Successful in 16s
Go / build (1.23) (push) Successful in 14s
Go / build (1.24) (push) Successful in 13s

To check that commits are according to the Conventional Commits spec.
https://www.conventionalcommits.org/en/v1.0.0/
This commit is contained in:
Luís Murta 2025-06-01 20:36:51 +01:00
parent a6ea697686
commit 07d28dc147
Signed by: satprog
GPG Key ID: 169EF1BBD7049F94
2 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,3 @@
export default {
extends: ["@commitlint/config-conventional"],
};

24
.github/workflows/lint-pr.yml vendored Normal file
View File

@ -0,0 +1,24 @@
name: Lint PR
on:
pull_request:
branches: ["main"]
jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: lts/*
- run: >-
npx commitlint
-g .github/workflows/commitlint.config.js
--from ${{ gitea.event.pull_request.base.sha }}
--to ${{ gitea.event.pull_request.head.sha }}
--verbose