Jira and Mecurial

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

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.

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.

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 Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,774 views 11 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot