Created
August 8, 2013 19:10
-
-
Save claudiob/6187713 to your computer and use it in GitHub Desktop.
At Topspin, we use the Pivotal Tracker ticket number in the name of the git branch assigned to that feature, e.g. 12345-feature. However, this format does not work for Pivotal/Github hooks, which require this text in the commit message: [#12345] feature If you just add the following gist in .git/hooks/prepare-commit-msg then the integration betw…
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 | |
# | |
case "$2,$3" in | |
merge,) | |
original_message=$(<$1) | |
echo $original_message | sed -e "s/^Merge branch '\([[:digit:]]*\)-/[#\1] &/" > $1 ;; | |
*) ;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've been wanting this. Thanks!