-
-
Notifications
You must be signed in to change notification settings - Fork 269
Description
Description
It would be great for magiclink to give users the ability to configure auto-linking of additional references specific to their context. The biggest use case here would be for external ticketing systems like Jira or Zendesk.
Benefits
This would greatly expand the potential uses of magiclink since it lets users configure additional providers without magiclink having any specific support for that provider.
Solution Idea
GitHub allows this kind of configuration of custom "autolinked references". See https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/configuring-autolinks-to-reference-external-resources
That interface strikes a nice balance between simplicity and customizability. It supports only patterns like <prefix><num> where the <prefix> is static and the <num> is a captured value (either numeric or alphanumeric) that can be injected into the output pattern.
We would add configuration that follows a similar pattern. Something like:
custom_refs:
- identifier_type: numeric
reference_prefix: JIRA-
# Must include <num> to indicate where to inject the identifier
target_url: 'https://jira.example.com/issue?query=<num>'