mirror of
https://github.com/ben-grande/qusal.git
synced 2025-08-07 05:32:21 -04:00
ci: lint pull request
This commit is contained in:
parent
6bfb3756c3
commit
ccee2094c2
2 changed files with 12 additions and 4 deletions
14
.github/workflows/main.yaml
vendored
14
.github/workflows/main.yaml
vendored
|
@ -46,9 +46,17 @@ jobs:
|
|||
- name: Lint commits
|
||||
# yamllint disable-line rule:line-length
|
||||
run: |
|
||||
if test "${{ github.event.before }}" = "${{ github.event.after }}" || test -z "${{ github.event.before }}"
|
||||
if test "${{ github.event_name}}" = "pull_request"
|
||||
then
|
||||
gitlint --debug --commit "${{ github.event.after }}"
|
||||
base="${{ github.event.pull_request.base.sha }}"
|
||||
head="${{ github.event.pull_request.head.sha }}"
|
||||
else
|
||||
gitlint --debug --commits "${{ github.event.before }}..${{ github.event.after }}"
|
||||
base="${{ github.event.before }}"
|
||||
head="${{ github.event.after }}"
|
||||
fi
|
||||
if test "${base}" = "${head}" || test -z "${base}"
|
||||
then
|
||||
gitlint --debug --commit "${head}"
|
||||
else
|
||||
gitlint --debug --commits "${base}..${head}"
|
||||
fi
|
||||
|
|
2
.gitlint
2
.gitlint
|
@ -32,7 +32,7 @@ line-length=72
|
|||
min-length=20
|
||||
|
||||
[body-is-missing]
|
||||
ignore-merge-commits=false
|
||||
ignore-merge-commits=true
|
||||
|
||||
[ignore-body-lines]
|
||||
regex=(^Co-Authored-By)|(^Reported-by)|(^Signed-off-by)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue