Skip to content

Instantly share code, notes, and snippets.

@oh-sky
Created December 15, 2015 13:36
Show Gist options
  • Save oh-sky/38813ef64a80e4675c94 to your computer and use it in GitHub Desktop.
Save oh-sky/38813ef64a80e4675c94 to your computer and use it in GitHub Desktop.
git_kanshi_tool
#!/bin/bash
APP_DIRS=('/path/to/dir' '/path/2/dir')
for app_dir in ${APP_DIRS[@]}
do
cd $app_dir
number_of_changed=`git ls-files --modified | wc -l`
if test $number_of_changed -gt 0 ; then
curl -F text="$app_dir} 以下の${number_of_changed}個のファイルに変更がありました。確認してください。" -F channel= -F token='' https://slack.com/api/chat.postMessage
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment