vscode-gitlens icon indicating copy to clipboard operation
vscode-gitlens copied to clipboard

Make autolinks more sophisticated

Open adambadura opened this issue 2 years ago • 2 comments

Current support for autolinks as

"gitlens.autolinks": [{ "prefix": "JIRA-", "url": "https://jira.company.com/issue?query=<num>" }]

is quite limited. And it seems to me there are more requirements where is this matched in the text, that are not clearly visible - I have had instances where the rule didn't seem to trigger and make a link.

How about changing this so that we have a list of regexes, and the link can use capturing groups from the regex? While those would be matched in the entire commit message. Gerrit's configuration of [commentlink] could be a nice base of the idea.

adambadura avatar Mar 14 '22 11:03 adambadura

@d13, I have browsed through the change, and it doesn't seem like it closes my ticket... Why have you marked it as closed?

adambadura avatar Jun 10 '22 03:06 adambadura

Sorry, the wrong issue was tagged in that commit.

eamodio avatar Jun 10 '22 05:06 eamodio

Would it be able to parse the current branch in addition to the commit message? In Gitlab, the commit message usually does not include the ticket number, but the branch does.

jankap avatar Nov 22 '22 14:11 jankap