IFS=$'\n' commits=($(git log --format=%s ${{ github.event.before }}..${{ github.event.after }})) Doesn't allow for force pushes to fix the commit message.
Run IFS=$'\n' commits=($(git log --format=%s 1bc1c1848b13aac1f534f70da045582419b891b9..2ba9ac4f809f44c543fc746fbf763cee8650997b))
IFS=$'\n' commits=($(git log --format=%s 1bc1c1848b13aac1f534f70da04558[2](https://github.com/NandosUK/infrastructure-terraform-modules/actions/runs/6250102139/job/16968249195#step:3:2)419b891b9..2ba9ac4f809f44c54[3](https://github.com/NandosUK/infrastructure-terraform-modules/actions/runs/6250102139/job/16968249195#step:3:3)fc746fbf763cee8650997b))
for commit in "${commits[@]}"
do
if ! [[ "$commit" =~ ^(feat|fix|chore|docs|style|refactor|perf|test)(\(.*\))?:?.{2,} ]]; then
echo "Invalid commit message: $commit"
exit 1
fi
done
shell: /usr/bin/bash -e {0}
fatal: Invalid revision range 1bc1c18[4](https://github.com/NandosUK/infrastructure-terraform-modules/actions/runs/6250102139/job/16968249195#step:3:4)8b13aac1f[5](https://github.com/NandosUK/infrastructure-terraform-modules/actions/runs/6250102139/job/16968249195#step:3:5)34f70da045582419b891b9..2ba9ac4f809f44c543fc74[6](https://github.com/NandosUK/infrastructure-terraform-modules/actions/runs/6250102139/job/16968249195#step:3:6)fbf[7](https://github.com/NandosUK/infrastructure-terraform-modules/actions/runs/6250102139/job/16968249195#step:3:7)63cee[8](https://github.com/NandosUK/infrastructure-terraform-modules/actions/runs/6250102139/job/16968249195#step:3:8)650[9](https://github.com/NandosUK/infrastructure-terraform-modules/actions/runs/6250102139/job/16968249195#step:3:9)97b
Error: Process completed with exit code [12](https://github.com/NandosUK/infrastructure-terraform-modules/actions/runs/6250102139/job/16968249195#step:3:13)8.```
IFS=$'\n' commits=($(git log --format=%s ${{ github.event.before }}..${{ github.event.after }}))Doesn't allow for force pushes to fix the commit message.