Markdown variable support in comment templates
Release notes
Support for markdown variables in the comment templates.
Problem to solve
As a GitLab user, I would like to be able to use markdown variables in the comment templates.
I use a comment template to approve an MR and assign it to be reviewed by a maintainer. The comment template looks like this
~backend LGTM.
@maintainer can you please review as a backend maintainer?
/assign_reviewer @maintainer
/unassign_reviewer @halilcoban
/approve
After applying the template, I replace the 2 maintainer parts with the username of the maintainer suggested by danger bot.
It would be better to be able to assign a variable and replace only one occurrence, something like
~backend LGTM.
[maintainer] can you please review as a backend maintainer?
/assign_reviewer [maintainer]
/unassign_reviewer @halilcoban
/approve
[maintainer]: replacethis
and only replace replacethis with a maintainer, eg @dgruzd.
but this causes two issues.
- Despite maintainer mention correctly linked (can see if hovered over maintainer), instead of username of the maintainer (
dgruzdin this example) it's written the word maintainer - Error:
Problem with assign_reviewer command: Failed to find users for '[maintainer]'.
Proposal
Markdown variable should be supported, including working with mentions.
