From 35c5afcd3effc7fa34c22178e75c12404883cf66 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Mon, 10 Aug 2020 11:20:28 +0200 Subject: [PATCH] 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 --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 45bacd659..f7f9e1220 100644 --- a/Makefile +++ b/Makefile @@ -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