Skip to content

Commit 2987c82

Browse files
committed
gitlint: Configure and run on all PRs
Configuration copied from pebble-dev/qemu.
1 parent ff35a89 commit 2987c82

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

.github/workflows/gitlint.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Lint Git Commits
2+
3+
on:
4+
pull_request: {}
5+
6+
jobs:
7+
lint:
8+
runs-on: ubuntu-24.04
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v4
12+
with:
13+
ref: ${{ github.event.pull_request.head.sha }}
14+
fetch-depth: 0
15+
16+
- name: Install GitLint
17+
run: pip install gitlint
18+
19+
- name: Run GitLint
20+
run: gitlint --commits "${{ github.event.pull_request.base.sha }}..HEAD"

.gitlint

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[general]
2+
contrib=contrib-body-requires-signed-off-by,contrib-disallow-cleanup-commits
3+
ignore-merge-commits=false
4+
ignore-fixup-commits=false
5+
ignore-fixup-amend-commits=false
6+
ignore-squash-commits=false
7+
regex-style-search=true
8+
9+
[ignore-body-lines]
10+
regex=^\[\d\]: https:\/\/

0 commit comments

Comments
 (0)