Skip to content

Instantly share code, notes, and snippets.

View cmackenzie1's full-sized avatar
🏠
Working from home

Cole Mackenzie cmackenzie1

🏠
Working from home
View GitHub Profile
#!/bin/bash
#
# Inspects branch name and checks if it begins with a Jira ticket number (i.e. ABCD-123).
# If yes, commit message will be automatically prepended with [ABCD-123].
# Resources:
# - https://gist.github.com/bartoszmajsak/1396344
# - https://stackoverflow.com/questions/34213120/find-branch-name-during-git-rebase
# - https://github.com/typicode/husky/issues/311#issuecomment-580237182
# - https://gmurphey.github.io/2013/02/02/ignoring-git-hooks-when-rebasing.html#.XkK1AhNKjOQ