mirror of
https://github.com/ben-grande/qusal.git
synced 2025-02-23 08:19:47 -05:00
ci: lint pull request
This commit is contained in:
parent
03cb70c2c2
commit
77d82811ad
14
.github/workflows/main.yaml
vendored
14
.github/workflows/main.yaml
vendored
@ -46,9 +46,17 @@ jobs:
|
|||||||
- name: Lint commits
|
- name: Lint commits
|
||||||
# yamllint disable-line rule:line-length
|
# yamllint disable-line rule:line-length
|
||||||
run: |
|
run: |
|
||||||
if test "${{ github.event.before }}" = "${{ github.event.after }}" || test -z "${{ github.event.before }}"
|
if test "${{ github.event_name}}" = "pull_request"
|
||||||
then
|
then
|
||||||
gitlint --debug --commit "${{ github.event.after }}"
|
base="${{ github.event.pull_request.base.sha }}"
|
||||||
|
head="${{ github.event.pull_request.head.sha }}"
|
||||||
else
|
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
|
fi
|
||||||
|
2
.gitlint
2
.gitlint
@ -32,7 +32,7 @@ line-length=72
|
|||||||
min-length=20
|
min-length=20
|
||||||
|
|
||||||
[body-is-missing]
|
[body-is-missing]
|
||||||
ignore-merge-commits=false
|
ignore-merge-commits=true
|
||||||
|
|
||||||
[ignore-body-lines]
|
[ignore-body-lines]
|
||||||
regex=(^Co-Authored-By)|(^Reported-by)|(^Signed-off-by)
|
regex=(^Co-Authored-By)|(^Reported-by)|(^Signed-off-by)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user