#!/bin/bash
FILE_CONTENT="PBCL2-666 [fix] whatever"
REGEX="^[[:upper:]]{4}[0-9]-[0-9]{3} \[(fix|poc|chore|feat|refactor|style|test)] .*"
if [[ $FILE_CONTENT =~ $REGEX ]]; then
 echo "Nice commit!"
else
  echo "Bad commit \"$FILE_CONTENT\", check format."
 echo $ERROR_MSG
 exit 1
fi