Created
February 19, 2014 03:04
-
-
Save mattdangerw/9085326 to your computer and use it in GitHub Desktop.
commit 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
#!/bin/bash | |
# move this script to the .git/hooks directory for your repo. or to a global | |
# git template directory. make sure to chmod +x this file | |
branch=`git rev-parse --abbrev-ref HEAD` | |
for repo in "sdk" "shell"; do | |
if [[ $branch == $repo/* ]]; then | |
number=`echo $branch | awk -F/ '{print $2}'` | |
link="[endlessm/eos-$repo#$number]" | |
grep -Fq "$link" $1 || { | |
echo "issue link: $link" | |
echo $link >> $1 | |
} | |
fi | |
done | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment