commit-msg 361 B

12345678910111213
  1. #!/usr/bin/env bash
  2. INPUT_FILE=$1
  3. START_LINE=`head -n1 $INPUT_FILE`
  4. PATTERN="^(HUE-[[:digit:]]+ \[.+\] .+)|(\[.+\] .+? \(#[[:digit:]]\))"
  5. if ! [[ "$START_LINE" =~ $PATTERN ]]; then
  6. echo "Bad commit message, see examples:"
  7. echo " HUE-9374 [impala] Use 26000 as default for thrift-over-http"
  8. echo " [livy] Add numExecutors options (#1238)"
  9. exit 1
  10. fi