Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force pushing breaks commit message check #21

Open
SilverCory opened this issue Sep 20, 2023 · 1 comment
Open

Force pushing breaks commit message check #21

SilverCory opened this issue Sep 20, 2023 · 1 comment

Comments

@SilverCory
Copy link
Member

SilverCory commented Sep 20, 2023

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.```
@miguelpuiggarcia
Copy link
Contributor

this has been fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants