Added a pre commit hook to central repo (or something similar)
Ok, so I have figured out how to add a pre-commit hook that checks for a
message that will reference a JIRA item.
#!/bin/sh
test "" != "$(grep 'JIRA-' "$1")" || {
echo >&2 "ERROR: Commit message is missing Jira issue number."
exit 1
}
I add this to my local repo and all cool. Every commit I make to it has
this commit message. However, I am interested in the situation where there
is a bunch of developers all commiting to their local repos and then
pushing / pulling to a remote master on githu . What I'd like is a similar
mechanism for when the push changes to the remote repo on gitlab that they
have to similarly reference a JIRA.
What is a good way to do this?
Thansk
No comments:
Post a Comment