Check for Jira issue key when commiting Edited

Hello,

 

I am looking for some help with script to check Jira Issue Key while commiting .

I am using Subversion Edge SVN on windows.I don't have any experience in scripting and don't know where to start.

 Basically this is what I expect.

"Restricting-Subversion-commits-if-the-Jira-Issue-key-is-Not-in"

 

1 answer

0 vote
Micky Caritte Community Champion Jan 08, 2018

Hi,

Definitely a good initiative. I would recommend you use bitbucket on top of GIT but if you're using Subversion/SVN and don't want to bring any change, you might have a commit hook which checks Jira through the REST API.

If you can identify a Jira key in the commit message (using a regular expression?) you can then send a query to the remote API to check for key existence. That might be the easiest way.

Hope this helps!

Thanks a  lot for response.

Actually I am very new to this.And I don't have any idea how to write a precommit hook to check for this.

If you can be any help that would be great.

Micky Caritte Community Champion Jan 09, 2018

I'm sorry but I,m proficient with Bitbucket but don't want to lead you in wrong path on building hooks directly on Subversion, I might not be the best person to help you out, hope this will be taken a step further by any other Champion or Community member :)

Ok.So what does bit bucket do?

Micky Caritte Community Champion Jan 09, 2018

Well bitbucket is a visual interface to manage your source code repositories using Git. I know there are easy solution to migrate from SVN to Git as it's kind of the new market standard but don't want to suggest you to rework all your way of working :)

The interest of Bitbucket is mainly its perfect integration with Jira which would allow you to track which commits are linked to which jira issues directly in Jira or Bitbucket itself and to sync pull requests as well, even builds! That's also an Atlassian tool with a lot of plugins on the marketplace which means you can easily extends its feature to fit your needs better.

A few highlights are available here: https://www.atlassian.com/software/bitbucket

Much more to discover on tutorials and blogs if you're interested!

Hello Micky,,

 

I have installed Bitbucket with GIT on my server.How do I start with it now?Does it work same way as SVN?

Hope you can help me with setup and integration.

I am going to purchase Jira and Bamboo today. if Bitbucket is succesfull will go ahead and purchase that as well.

Micky Caritte Community Champion Jan 10, 2018

Hi,

Unfortunately I'm afraid the Community might be a simple guide but not a full partner for integration.

I advise you to get in touch with a local partner who can help you setuping and integrating all applications together, there might even be more services you could benefit from. Also, if you want to try it by yourself, you might want to use an evaluation license in a dev environment to try and use the products and check how it work.

The quick thing I can add is that Bitbucket is slightly different than SVN as it's using Git but it's a well done interface to help you and your devs working easily. There's even SourceTree which can be useful for your dev people to checkout, commit, pull request code etc...

Good luck with your integration, keep us posted if you have more precise questions!

Cheers

Thanks

intergration is already done.

 

But I was not able to find out any guide to set Pre-Commit hook to check for Jira issue key.Can you give me some links that will works?

Micky Caritte Community Champion Jan 10, 2018

Sure, glad you've managed to get there!

In the past I,ve used various ways but the easiest one I've found to check a commit message was an addon which is free and so powerful: YACC (Yet Another Commit Checker). You can have a look here: https://marketplace.atlassian.com/plugins/com.isroot.stash.plugin.yacc/server/overview

In your case I think the Jira issue checker will help a lot! You can check if an issue exists in Jira before allowing a commit and even restrict a subset with a query!

Hope this helps!

Cheers

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 ...

3,323 views 14 20
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