mirror of
https://github.com/ben-grande/qusal.git
synced 2025-02-22 15:59:50 -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
|
||||
# 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user