ci: always fetch GIT_SINCE for commitlint

When running the commitlint CI job, the branch that the PR is based on
may not be available. That makes it impossible for commitlint to detect
the changes between the HEAD of the branch, and the commits in the PR.

By fetching GIT_SINCE unconditionally, commitlint should be able to
detect the changes and only run the tests against the commits that were
added through the PR.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2020-08-10 11:20:28 +02:00 committed by mergify[bot]
parent 65a0e5c40b
commit f7c6b2bb72

View File

@ -54,6 +54,7 @@ lint-yaml:
./scripts/lint-extras.sh lint-yaml
commitlint:
git fetch -v $(shell cut -d/ -f1 <<< "$(GIT_SINCE)") $(shell cut -d/ -f2- <<< "$(GIT_SINCE)")
commitlint --from $(GIT_SINCE)
.PHONY: containerized-test