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

Borek Bernard September 4, 2013

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
Answer accepted
Timothy
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 4, 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.

Borek Bernard September 15, 2013

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.

1 vote
Serge Knystautas October 21, 2013

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

0 votes
Anton Ukhanev July 22, 2015

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?

0 votes
Anton Ukhanev July 22, 2015

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?

Suggest an answer

Log in or Sign up to answer