-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regular expressions in autolinks #1314
Comments
Sounds like a good idea. Would you mind opening a PR to add it or get it started? I'd be happy to help point in the right direction, etc. |
Where to get started? Is this the right file? https://github.com/eamodio/vscode-gitlens/blob/main/src/annotations/autolinks.ts |
@jameswilson yup, that where they are detected. Here is the config type that will need to be expanded And those get turned into these: So you can probably do some parsing here: To turn the regex on the config items into |
@eamodio In above case, I want to enable autolink for 123 and 456 to: As jameswilson pointed out, it would be great if we can use regex match to do the job |
Umm... tap tap tap is this thing on? Could someone please merge this? I can't use auto links till they're enhanced a bit. Our JIRA installation has no less than 350 projects listed... I'm not adding 350 config blocks to manually maintain. But until this feature is merged and released there will be NO using auto link for me. Which means any thought of buying GitLens is out, period. Your loss folks... this ticket has been sitting here for 2 months... seriously... |
Would love to see this happen |
Any resurrection of this? |
plz merge those PRs, don't want to keep making new autolinks every time i see a new board. kills momentum |
|
|
The use case that describes Autolink usage with JIRA and discussed originally on #897, is not as robust as it could be.
Current example:
JIRA-
, but in the real world, each project has a different prefix, this means you have to literally configure this setting for every VSCode project. Too much work to maintain.<num>
which I assume to be a numeric value, but in the real world Jira on Atlassian Cloud needs both the project ID AND the issue number together to navigate you to the issue. The URLs look something like thishttp://<company>.atlassian.net/browse/JIRA-123
whereJIRA
is the project id and123
is the issue number. Again, this could be manually done for each repository but this could be simplified with a regular expression pattern match.This feature request would be to expand the configuration to support regular expression pattern matching using parentheses to capture the necessary info into a group, and then use backreferences like
$1
for each capture group in the URL replacement.Proposed example:
The feature would need to be able to run multiple times over a commit message, in case multiple issues are referenced, all of them need to be linked.
The feature would need to support multi-line commit messages.
Example of the pattern being used above
https://regex101.com/r/0tABhu/1
The text was updated successfully, but these errors were encountered: