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

This widget could not be displayed.
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.

This widget could not be displayed.

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

This widget could not be displayed.

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?

This widget could not be displayed.

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 Sign up to answer
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

207 views 1 3
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