For the sources of http://whatthecommit.com see https://github.com/ngerakines/commitment
To use it -> Paste this function in your terminal or add it to your bash_functions file:
funnyCommit() {
commitMessage=$(echo $(curl --silent --fail whatthecommit.com/index.txt))
echo "Your Commit Message is -> ${commitMessage}"
echo "Do you wish to procced with this commit message 😅 (y/n/o = other)?"
old_stty_cfg=$(stty -g)
stty raw -echo ; answer=$(head -c 1) ; stty $old_stty_cfg
if echo "$answer" | grep -iq "^y" ;then
git add -A && git commit -m "${commitMessage}"
elif echo "$answer" | grep -iq "^o" ;then
funnyCommit
else
echo "You are smart ♥️"
fi
}
And call it like this (inside a git repository):
funnyCommit
Or run this:
bash <(curl -sL https://gist.githubusercontent.com/dovimaj/d028a36e39761a6df52767576830b854/raw/#file-funnycommit-sh.sh)