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 b864afd6d7
commit 35c5afcd3e

View File

@ -120,6 +120,7 @@ check-env:
@./scripts/check-env.sh
commitlint:
git fetch -v $(shell cut -d/ -f1 <<< "$(GIT_SINCE)") $(shell cut -d/ -f2- <<< "$(GIT_SINCE)")
commitlint --from $(GIT_SINCE)
.PHONY: cephcsi