mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-22 22:30:23 +00:00
ci: use FETCH_HEAD like "commitlint --from" does
After fetching the target branch for the PR, the GIT_SINCE ref in the git repository may not be set (in CI environments). This causes 'git rebase' to fail. Use FETCH_HEAD instead, so that the checked out PR gets rebased correctly. Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
6fc3706fab
commit
64588e2b1c
2
Makefile
2
Makefile
@ -61,7 +61,7 @@ lint-yaml:
|
||||
commitlint: REBASE ?= 0
|
||||
commitlint:
|
||||
git fetch -v $(shell cut -d/ -f1 <<< "$(GIT_SINCE)") $(shell cut -d/ -f2- <<< "$(GIT_SINCE)")
|
||||
@test $(REBASE) -eq 0 || git -c user.name=commitlint -c user.email=commitline@localhost rebase $(GIT_SINCE)
|
||||
@test $(REBASE) -eq 0 || git -c user.name=commitlint -c user.email=commitline@localhost rebase FETCH_HEAD
|
||||
commitlint --from FETCH_HEAD
|
||||
|
||||
.PHONY: containerized-test
|
||||
|
Loading…
Reference in New Issue
Block a user