From e48c557387f75b12cfcccc5b3c7806e9a8a113fa Mon Sep 17 00:00:00 2001 From: Anthony Bilinski Date: Sat, 2 Apr 2022 19:37:00 -0700 Subject: [PATCH] fix(CI): Fix commit message check on single commit PRs The range of COMMIT..COMMIT does not count the starting commit, so single commit PRs are completely unchecked, and multi commit PRs don't have their first commit checked. --- .ci-scripts/verify-commit-format.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci-scripts/verify-commit-format.sh b/.ci-scripts/verify-commit-format.sh index bba24135b..72fea44ef 100755 --- a/.ci-scripts/verify-commit-format.sh +++ b/.ci-scripts/verify-commit-format.sh @@ -21,5 +21,5 @@ set -eu -o pipefail # Verify commit messages readarray -t COMMITS <<<$(curl -s ${GITHUB_CONTEXT} | jq -r '.[0,-1].sha') -COMMIT_RANGE="${COMMITS[1]}..${COMMITS[0]}" +COMMIT_RANGE="${COMMITS[1]}~1..${COMMITS[0]}" bash ./verify-commit-messages.sh "$COMMIT_RANGE"