Git commit with Valid Jira issue code

I am able to write an update which allows the the format of the PROJECT-###: <message> in commit and if it misses it throws oout the ERROR. Now I am looking to make sure the PROJECT-### is valid Jira issue number (as It takes any number which is not a valid number)

Need Help

2 answers

This widget could not be displayed.
Timothy Chin Community Champion May 19, 2014

You need to write a Git pre-commit hook for your repositories. Or if you are using Stash, write one for it.

I need the shell to validate the Jira ticket number. I have already written the hook with does take the format of the ticket but does not validate with Jira if the ticket exists or not.

Timothy Chin Community Champion May 21, 2014

Extend your script to make the call to JIRA then. If the response code is anything other and a 2xx or a 3xx, you know you've got a invalid issue key.

This widget could not be displayed.

Commit Policy Plugin verifies not only the syntactical correctness of JIRA issue keys, but also check them against a JQL query!

See:

Edit Commit Policy.png

This is the relevant part of the documentation: http://www.midori-global.com/products/jira-commit-policy-plugin/documentation/#issue-in-jql-result-condition

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

262 views 5 0
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