Jira Commit Acceptance for Mercurial?

Shelli November 14, 2013

Is there a plugin similar to Jira Commit Acceptance for Mercurial repos? I'd like to ensure that commits contain the JIRA issue key.

2 answers

1 accepted

1 vote
Answer accepted
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.
September 22, 2015

Commit Policy Plugin verifies the Mercurial commit messages against a JIRA JQL query, which adds a lot of flexibity! Not only it checks if there is a JIRA issue key, but also check its "properties" (type, status, project, etc.).

It works with Mercurial (and Git and Subversion).

See the full documentation and the Mercurial and TortoiseHg specific page.

0 votes
Renjith Pillai
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 16, 2013

If Mercurial support hooks (which I assume yes), you do not really need a add-on to handle this.

Write a small perl/python script which can do a regex on the commit message, and for the matches do a REST call to the JIRA instance with the issue key (use a fixed username/password).

If the call is successful (HTTP 200), then allow the commit. You may also make it more intelligent by parsing the JSON object and seeing if the issue is still in open state :).

Shelli November 17, 2013

Since I don't know either PERL or Python, I would prefer if there was a plugin. It appears the answer is no.

Suggest an answer

Log in or Sign up to answer