Last active
August 10, 2016 18:38
-
-
Save asiviero/6241b8212fbe00a3c95cd759d4364f33 to your computer and use it in GitHub Desktop.
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/sh | |
# | |
# Get the issue based on a WEB-\d+ regex and prepend it to the commit msg | |
issue=$(git symbolic-ref HEAD | sed -n 's/^.*\(WEB-[0-9][0-9]*\).*$/\1/p') | |
if [ -n "$issue" ]; then | |
echo -n "$issue " | cat - $1 > /tmp/out && mv /tmp/out $1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Windows version. Need a place where you have write access. Something like: