Allow external autolinks in titles of pull requests #9369
Replies: 93 comments 8 replies
-
+1 Though, it seems Github doesn't autolink anything in the PR title, including other PRs or issues. |
Beta Was this translation helpful? Give feedback.
-
+1 when will you support this feature? Gitlab already support it |
Beta Was this translation helpful? Give feedback.
-
+1 this seems an obvious product need |
Beta Was this translation helpful? Give feedback.
-
This would be a really nice feature. As far as I know, gitlab already has this feature. |
Beta Was this translation helpful? Give feedback.
-
Please consider implementing this feature in a foreseeable future. I believe it has a great outcome to effort ratio. |
Beta Was this translation helpful? Give feedback.
-
+1 |
Beta Was this translation helpful? Give feedback.
-
We migrated two years ago from Bitbucket to GitHub. Bitbucket supported this out-of-the-box and it's a feature I still greatly miss. |
Beta Was this translation helpful? Give feedback.
-
I have a feeling this would take 10 minutes to implement, but I guess no one at GH thinks it's important enough. |
Beta Was this translation helpful? Give feedback.
-
Please add this feature |
Beta Was this translation helpful? Give feedback.
-
While this issue keeps collecting dust, here is a workaround that solved it for me in Chrome: It offers exactly the same settings as standard GitHub autolinks, but applies them to PR titles: ![]() |
Beta Was this translation helpful? Give feedback.
-
I created a TamperMonkey script to address the issue: // ==UserScript==
// @name github-pr-jira-link-injector
// @version 0.1
// @description Adds a link from Github PRs to Jira issues; the link should follow the following convention: ABC-12345
// @author nizametdinov
// @match https://github.com/*/pull/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=github.com
// @grant none
// ==/UserScript==
(function injectLink() {
const $issueTitle = document.querySelector('.js-issue-title, [data-component="PH_Title"] .markdown-title');
// always track changes as the contents of the page may be changed, say, by switching tabs (Conversation, Commits, Files changed, etc)
if ($issueTitle && !$issueTitle.hasAttribute('data-github-pr-jira-link-injector-processed')) {
const jiraKey = /[A-Z]+\-\d+/.exec($issueTitle.innerText);
if (jiraKey) {
$issueTitle.innerHTML = `<a href="https://<your-domain>.atlassian.net/browse/${jiraKey}">${$issueTitle.innerText}</a>`;
}
$issueTitle.setAttribute('data-github-pr-jira-link-injector-processed', 'true');
}
setTimeout(injectLink, 1000);
})(); |
Beta Was this translation helpful? Give feedback.
-
This issue is missing an |
Beta Was this translation helpful? Give feedback.
-
External autolinks can be active in pull request descriptions and comments, but not titles. It would be very nice if links were automatically substituted in titles as well.
Thank you for your consideration.
Beta Was this translation helpful? Give feedback.
All reactions