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 | |
# curl -s https://gist.githubusercontent.com/salvatorecordiano/ff73d811c8933c08ea68c1177f3db6c9/raw/6312ceaa840928164afa06e0e42968753b745f61/prepare-commit-msg > .git/hooks/prepare-commit-msg && chmod +x .git/hooks/prepare-commit-msg | |
COMMIT_MESSAGE=$(cat $1) | |
PRECOMMIT_MESSAGE=$(git symbolic-ref --short HEAD | grep -Eo "[A-Z0-9]+-[A-Z0-9]+") | |
RED=`tput setaf 1` | |
GREEN=`tput setaf 2` | |
RESET=`tput sgr0` | |
if [ ! -z "$PRECOMMIT_MESSAGE" ]; then |
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
{ | |
"update_id": 111111111, | |
"message": { | |
"message_id": 1, | |
"from": { | |
"id": 01234567890, | |
"is_bot": false, | |
"first_name": "Steve", | |
"last_name": "Jobs", | |
"username": "stevejobs", |
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
<?php | |
$content = file_get_contents("php://input"); | |
$update = json_decode($content, true); | |
if (! $update) { | |
exit; | |
} | |
$chatId = $update['message']['chat']['id'] ?? null; |
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
<?php | |
$content = file_get_contents("php://input"); | |
$update = json_decode($content, true); | |
if(! $update) { | |
exit; | |
} | |
$chatId = $update['message']['chat']['id'] ?? null; | |
$text = $update['message']['text'] ?? null; |
NewerOlder