Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

make jira links clickable in github

Tags:

github

jira

Is there anyway I can make jira ticket id's on github link to jira directly ? ( much the same way as how it happens on bitbucket ? ) Maybe there is a plugin or something I could use ?

Sorry if this is the wrong place to post this type of question, please comment if I should post this somewhere else.

EDIT:
I specifically want ticket id's in github to link through to JIRA, this is not described in any of the resources below:

  • How do I connect github to JIRA?

  • https://confluence.atlassian.com/display/BITBUCKET/Linking+Bitbucket+and+GitHub+accounts+to+JIRA

  • https://help.github.com/articles/integrating-jira-with-your-projects/

like image 815
Willem D'Haeseleer Avatar asked Apr 06 '15 14:04

Willem D'Haeseleer


People also ask

How do I mention a Jira issue in GitHub?

Include the issue key in the branch name when you create the branch to link it to your Jira issue. This works by default in connected Bitbucket, GitLab, GitHub, GitHub Enterprise, and Fisheye tools.

Does Jira support GitHub?

Developer links. The Jira and GitHub integration synchronizes development across tools and uses automation to remove manual steps and shorten delivery time. By connecting your code in GitHub to your projects in Jira, your developers can focus less on updates and more on building great products.


1 Answers

No need for Chrome plugin, Safari hack or scripts.

From October 2019, GitHub can automatically transform TICKET references to Jira links, for example.

See "Save time linking resources with autolink references" from Lars Schneider.

Now you can set up an autolink reference and GitHub will automatically create links (to external systems) for you.

https://i2.wp.com/user-images.githubusercontent.com/477434/66348334-994e1000-e956-11e9-8c87-9e871c221955.gif?resize=992%2C458&ssl=1

How it works

If you use GitHub with external services (like Jira), you might be familiar with shorthand references (like TICKET-123) to point to resources in those external systems.

Starting today, GitHub can automatically transform shorthand references into clickable links for GitHub Pro, Team, and Enterprise plans.

So not the regular github.com.

To enable this feature, a repository admin needs to register the reference prefix (such as TICKET-) in the settings.
Afterwards, references of that type are detected in issues, pull requests, comments, or commit messages, and turned into links.

This speeds up navigation between GitHub and external systems.

See documentation.

Note that the ticket prefix is not included in the hyperlink despite being included in the anchor text. The URL preview in the setting is accurate:

GitHub Autolinks are not so awesome for Jira

The animation in the feature announcement, replicated above, shows this limitation but not clearly.

This means that you have to either include the project key in the target URL as well or prefix all project keys with a another key and use that as the autolink prefix.

You cannot even use Git's trailers to reference tickets and use autolinks, because trailers are key-value pairs separated by : (colon space) and an autolink prefix that ends with a space is invalid.

like image 86
VonC Avatar answered Oct 03 '22 20:10

VonC