Skip to content

Instantly share code, notes, and snippets.

@jimgolfgti
jimgolfgti / prepare-commit-msg
Created May 9, 2017 09:41
Prepend Jira ticket references to git commit message
#!/bin/sh
# If commit message does not refer to any JIRA issue number,
# this hook will parse the JIRA issue from the current branch and
# prepend it to the commit message.
# It will also ignore any brnahces that have no valid JIRA issue number
#
# Example:
# Branch: GG-645 or GG-645-some-text
# commit message: Updated README.md

Keybase proof

I hereby claim:

  • I am jimgolfgti on github.
  • I am jimgolfgti (https://keybase.io/jimgolfgti) on keybase.
  • I have a public key whose fingerprint is 26C8 ED1B 172A A7A1 40F1 D5A3 C054 A914 1BAF 1830

To claim this, I am signing this object: