Skip to main content

Module prepare_commit_msg

Module prepare_commit_msg 

Source
Expand description

prepare-commit-msg — append the issue id found in the branch name.

JIRA first (ABC-1234), else a bare Kanbanize id (1234). Only for a commit the user is authoring: -m, -t, a merge, a squash and --amend all pass a source in $2 and are left alone.

Functions§

find_digits
[0-9]{3,}, greedy, leftmost.
find_jira
[A-Z]{3,32}-[1-9][0-9]{1,31}, by hand.
run