Parameterized issue/MR templates
Consider these issue templates used at GitLab:
They all have in common the idea that a user needs to change certain placeholders in the template text into actual values. However, especially when a placeholder is used multiple times, or there are a large number of them, it becomes difficult to manage this manually. It may also be unclear what sort of value is expected for a given parameter.
Our issue templates are markdown, and markdown can have metadata. There's a few ways to do this, but the most common is to have a hash at the very top of the markdown file, organized as follows:
--- foo: bar baz: x: y y: z --- # Actual markdown here Text...
A parameterized template would be one that specifies certain placeholders, for instance:
--- placeholders: "@FOO": The value of foo "@BAR": Some value antithetical to "foo" --- # A template @FOO is antithetical to @BAR
When given a template like this, the GitLab frontend could prompt the user to enter values for each parameter, showing the help text, and update the template automatically before filling the new issue description.
We could also use metadata (or the
<h1> equivalent element,
#) to specify a default issue / MR title, using the same parameters. This is of no use at present, but with parameterization, has a great deal of value (as we see in the exception request template).
Links / references