Pre-commit hook to check JIRA issue reference in commentary text?

256 views
Skip to first unread message

Lars R

unread,
Mar 25, 2014, 7:19:01 AM3/25/14
to gitext...@googlegroups.com
We are migrating from Subversion to Git and Atlassian Stash and have earlier been using a pre-commit hook in Subversion to enforce users to type in a JIRA issue reference in the comment field, prior to commiting.

I am now looking for a way to do the same in Git. Given that Git is distributed and Subversion is not, I realize this is not trivial... There is a possibility to add a pre-push hook in Stash to block push attempts for repos with comments lacking JIRA references, but this will force the users to amend and/or rebase their local repo to be able to edit the comments, and I strongly suspect that will cause irration, errors and general toothgrinding... 
Better then if there was a way to check the commentary text prior to commit, like in a pre-commit hook, and maybe even add some functionality to suggest suitable JIRA issues to refer to if none is found. I found the Scripts functionality in Git Extensions and thought that maybe it could be used to call a web service of some sort, but I find no documentation of how to interact with the commit sequence, like for instance return TRUE/FALSE to control the program flow. Maybe that's not the intended purpose of the scripts either.

I'm kinda lost here. Has anyone of you faced the same problem or have any suggestions on how to solve this?

Regards,
Lars

trash trash

unread,
Mar 25, 2014, 8:27:33 AM3/25/14
to gitextensions
just use GitBlit it has built in hooks


--
You received this message because you are subscribed to the Google Groups "GitExtensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gitextension...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages