Browse Source

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.
reviewable/pr6615/r1
Anthony Bilinski 3 years ago
parent
commit
e48c557387
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
  1. 2
      .ci-scripts/verify-commit-format.sh

2
.ci-scripts/verify-commit-format.sh

@ -21,5 +21,5 @@ set -eu -o pipefail @@ -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"

Loading…
Cancel
Save