Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View ckoppelman's full-sized avatar

Charles Koppelman-Milstein ckoppelman

View GitHub Profile
@ckoppelman
ckoppelman / commit-msg
Last active December 18, 2015 03:08
Githook for requiring a JIRA issue in the commit message like [REALM-1234]. Place this in .git/hooks/
#!/bin/sh
message=`cat $1`
prevLang=`echo $LANG` # this will get reset once we're done here
rc=0
# The Portable-Git that comes with Github for Windows has a bash version of 3.1.0,
# so it doesn't understand regex matching. Use pattern matching instead.
# regex="(\[[A-Z]{2,5}-[0-9]{1,6}\]|\[NO-ISSUE\])"