Skip to content

Instantly share code, notes, and snippets.

@KyMidd
Created October 7, 2021 01:11
Show Gist options
  • Select an option

  • Save KyMidd/a396e2ffc5fee0c84da67ac74c2729d5 to your computer and use it in GitHub Desktop.

Select an option

Save KyMidd/a396e2ffc5fee0c84da67ac74c2729d5 to your computer and use it in GitHub Desktop.
# If any commit are invalid, print reject message
if [ "$invalidCommit" == true ]; then
echo "Your push was rejected because at least one commit message on this branch is invalid"
echo "Please fix the commit message(s) and push again."
echo "https://help.github.com/en/articles/changing-a-commit-message"
echo "************"
exit 1
elif [ "$invalidCommit" == false ]; then
echo "************"
echo "All commits are valid"
echo "************"
exit 0
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment