make jira links clickable in github

孤街浪徒 提交于 2019-12-09 04:22:16

问题


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/


回答1:


I decided to make a Chrome extension for this ! This extension works on all websites, not just Jira ! :D

Install it here:
https://chrome.google.com/webstore/detail/jira-hotlinker/lbifpcpomdegljfpfhgfcjdabbeallhk

Source code:
https://github.com/helmus/Jira-Hot-Linker




回答2:


No need for Chrome plugin, Safari hack or scripts.

From October 2019, GitHub can automatically tranform TICKET references to Jira (for example) links.

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.

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.




回答3:


If you mean the commit message for commit e0d9e32 shows TEST-1234 Fixed this really bad bug and you want TEST-1234 to link to http://www.your-jira.com/browse/TEST-1234 then no it does not look like this is possible.

You could look to do a Chrome/Firefox browser plugin that accomplishes the behavior you desire. (Scans the webpage looking in certain sections for JIRA Key's and then updates them to links)




回答4:


I wrote a site specific Safari hack. It requires you to install it yourself, but that gives you the opportunity to read the code (it's short!) first. https://github.com/unicode-org/icu-jira-safari

  • it fetches elements of class commit, gh-header-title, and js-issue-row with getElementsByClassName()
  • then, for anything such as ICU-1234 (our Jira project id), it creates a link to the appropriate URL on the Jira server.

I wanted to include Jira issue status as well, but Atlassian Cloud CORS settings prevent that.

Here is an example if the linkification (ICU-10464 turns into a link on the right hand side).




回答5:


Someone made exactly what I wanted coming from gitlab.

https://chrome.google.com/webstore/detail/linkify-jira-issues/ekbbnaokafbanjgmcbllligemhiclbcb

This updates the text in my github PRs to convert them in clickable links.



来源:https://stackoverflow.com/questions/29473255/make-jira-links-clickable-in-github

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!