Jira and Mecurial

Mike Agee February 11, 2014

I would like to verify the existence of a JIRA issue from a Mercurial hook that is run during the commit process. Is this possible?

2 answers

1 accepted

1 vote
Answer accepted
Bhushan Nagaraj
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 11, 2014

Yes Mike. I am guessing you are writing your pre-commit hooks in python right? Make a rest call to JIRA api to check if the issue exists.

Mike Agee February 12, 2014

Thanks Bhushan, that was what I thought. I was able to use the 'requests' python module successfully for doing this in a hook on a linux box, but have had nothing but unbelieveable struggle on a Windows 8 box trying to emulate for local repos. I have a suspicion that most examples for python/jira/restful api are in the non-windows domain, which again works without struggle. Not being a python programmer and not totally understanding how to add what I think are called extensions (i.e. the requests module) to the python process used by mercurial is where things fall apart for me.

1 vote
Midori
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 25, 2015

Commit Policy Plugin provides this function, and lots of other checks, for Mercurial commits.

See the add-on documentation, especially its Mercurial page.

Suggest an answer

Log in or Sign up to answer