it seems the check currently only runs on pull requests against the base commit.
ci/lint/06_script.sh
runs always except cases defined in the FILTER_TEMPLATE
.
On master it is presumably skipped because the base commit is equal to the HEAD commit?
According to Cirrus CI docs, the CIRRUS_BASE_SHA
variable is defined for PRs only. Therefore, it is natural to have distinct code paths to evaluate COMMIT_RANGE
for PRs and non-PRs.
So maybe all places where COMMIT_RANGE
is used can be guarded by a check on CIRRUS_PR
?
Given COMMIT_RANGE
is used in two python scripts, it’s okay to evaluate it before test/lint/lint-all.py
. That is the case for the current ci/lint/06_script.sh
file.
Or instead skip if the range is empty?
I cannot figure out such cases.