mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-04-28 23:11:21 +00:00
tools: Add commit linter
Run under Github Actions, and restrict commit messages, structure, with, etc. Enforce using only our specified prefixes for commit messages. It reduces the work release managers do when _crafting_ release notes. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
parent
843427dd69
commit
f05a0c1dde
44
.github/commitlint.config.js
vendored
Normal file
44
.github/commitlint.config.js
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
module.exports = {
|
||||
rules: {
|
||||
'header-max-length': [2, 'always', 72],
|
||||
'type-case': [2, 'always', 'lower-case'],
|
||||
'type-empty': [2, 'never'],
|
||||
'type-enum': [
|
||||
2,
|
||||
'always',
|
||||
[
|
||||
'babeld',
|
||||
'bfdd',
|
||||
'bgpd',
|
||||
'doc',
|
||||
'docker',
|
||||
'eigrpd',
|
||||
'fpm',
|
||||
'isisd',
|
||||
'ldpd',
|
||||
'lib',
|
||||
'multi',
|
||||
'nhrpd',
|
||||
'ospf6d',
|
||||
'ospfd',
|
||||
'pbrd',
|
||||
'pimd',
|
||||
'pim6d',
|
||||
'ripd',
|
||||
'ripngd',
|
||||
'sharpd',
|
||||
'staticd',
|
||||
'tests',
|
||||
'tools',
|
||||
'vtysh',
|
||||
'vrrpd',
|
||||
'yang',
|
||||
'zebra',
|
||||
'all',
|
||||
],
|
||||
],
|
||||
'subject-empty': [2, 'never'],
|
||||
'subject-full-stop': [2, 'never', '.'],
|
||||
'subject-case': [2, 'always', 'sentence-case'],
|
||||
},
|
||||
};
|
19
.github/workflows/commitlint.yml
vendored
Normal file
19
.github/workflows/commitlint.yml
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
name: commitlint
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
if: github.repository == 'frrouting/frr'
|
||||
permissions:
|
||||
contents: read
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check Commit
|
||||
uses: wagoid/commitlint-github-action@v5
|
||||
with:
|
||||
configFile: .github/commitlint.config.js
|
Loading…
Reference in New Issue
Block a user