Created
May 4, 2021 14:02
-
-
Save bserem/25cedc950e00848f9d712e9a5d26c48a to your computer and use it in GitHub Desktop.
Git hook to automatically add [skip ci] to commit message.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
exec < /dev/tty | |
read -n 1 -p "Would you like to run CI? (y/N) " ans; | |
ans=${ans:-n} # Default is no, always add [skip ci] | |
echo # Just add a new line | |
case $ans in | |
y|Y) | |
exit;; | |
n|N|*) | |
sed -i '$s/$/ [skip ci]/' $1;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment