Plugin hooks for adding custom GFM tokens
Problem to solve
Developers integrate a diverse range of tools to their workflow. Enriching developer context by connecting these tools allows developers to efficiently communicate: this is why we have GFM functionality such as referring to issues, branches, MRs ...
If Gitlab plugins had an interface (say adding to the GFM pipeline in GfmPipeline.filters for Markdown, or similar when rendering source) then we'd be able to enrich the context available (so a // @TODO #33047
could link to the relevant issue when viewing source, and a // @see EXT-123
could link to some external tool).
I see #33047 (moved) proposes a clientside approach to enriching the source view, while I'm thinking primarily about plugins adding custom GFM filters, and both seem to be valid use cases with different approaches.
My goal here is to extend GFM, not source display, but it could make sense to expose interfaces for plugins to extend both.
Proposal
What does success look like, and how can we measure that?
An extension can extend the available token replacements in GFM, so that the various GFM-rendered outputs in Gitlab can be more efficiently related to external tools.
Links / references
- #33047 (moved) has a different approach, and focussed on source view not markdown rendering.
- #15635 (moved) has a proposal to permit adding custom.css / custom.js to Gitlab - similar use cases are proposed there (see eg @tonasj's comment there)