In JIRA wiki syntax, how to link to a Git (BitBucket) commit?

I want to add a JIRA comment that references a Git commit. Our Git repository is hosted on BitBucket so I would ideally like to configure JIRA that when it sees something like "commit #abcdef" in the JIRA markup language, it would create a link to http://bitbucket.org/ourorg/ourrepo/commits/abcdef.

Is that somehow possible? We have the "DVCS connector" installed but I don't see any hints on how to do it in the wiki markup docs.

4 answers

1 accepted

0 votes
Timothy Chin Community Champion Sep 04, 2013

I don't think there is a way to link the Git commit in the comment. You might need to either create your own renderer or just us the BitBucket add on that gives you the issue tab panel.

What do you mean by "issue tab panel"? Inside JIRA, we have DVCS connector installed which gives us a view on related Git commits but that plugin itself does not have functionality that would help with what I'm trying to achieve - if I have not missed something.

Before we had to migrate to git, we would comment on tickets: "Please backport r39287 to the test branch". Now that Atlassian forced us to move to git, we've lost this control so we have to embed the full URL to the bitbucket commit.

This is for fisheye, but it's the same notion... type in a sha hash and have that link: https://jira.atlassian.com/browse/FE-3954

In my case, I already mention the BitBucket issue number in my commits. I don't want to loose BitBucket integration. So, this probably means that now I have to mention 2 things in every commit message.... I was really looking forward to "integration" between an issue and commits that address it on a feature branch dedicated to that issue. Another thing that I found weird is that apparently mentioning commit hashes in comments no longer auto-links to that commit. BitBucket has that feature, and in my team we use that a lot. What happened, JIRA?

On another note. We have a DVCS connector installed that links our JIRA project to our BitBucket project. When I imported the BitBucket project, the BitBucket issue mentions in commit messages (which also appear in the comments) were changed to JIRA issue mentions. However, that did not link the commit to the issue. Why? Will something like this be implemented?

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,968 views 12 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