Skip to content

Commit 8385f1c

Browse files
config: added checkstyles commit-message ci test
1 parent 439ba1d commit 8385f1c

2 files changed

Lines changed: 35 additions & 0 deletions

File tree

.github/workflows/linter.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Commit Message
2+
3+
on:
4+
pull_request:
5+
branches: [ master ]
6+
7+
jobs:
8+
gitlint:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
fetch-depth: '0'
14+
15+
- uses: actions/setup-python@v5
16+
with:
17+
python-version: '3.x'
18+
19+
- name: Install gitlint
20+
run: pip install gitlint
21+
22+
- name: Run gitlint
23+
run: gitlint --commits ${{ github.event.pull_request.base.sha }}..${{ github.sha }}

.gitlint

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[general]
2+
ignore=body-is-missing,subject-case
3+
4+
[title-max-length]
5+
line-length=200
6+
7+
[title-match-regex]
8+
regex=^(Issue #\d+: .*|Pull #\d+: .*|(minor|config|infra|doc|spelling|dependency): .*)$
9+
10+
[title-trailing-punctuation]
11+
12+
[title-trailing-whitespace]

0 commit comments

Comments
 (0)