Created
October 8, 2020 23:02
-
-
Save alipandidan/9f074edcdb420d05fb05496248f61d09 to your computer and use it in GitHub Desktop.
Telegram notification git hook
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
COMMITS=$(git --no-pager log origin/master..HEAD --format="- [%h] %B") | |
API_URL="https://api.telegram.org/bot${BOT_TOKEN}/sendMessage?chat_id=${CHAT_ID}" | |
curl --silent -o /dev/null \ | |
--header "Content-Type: application/json" \ | |
--request POST \ | |
--data "{\"text\": \"${COMMITS}\"}" \ | |
$API_URL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment