This is a quick and simple example on how we can use a template engine to create markdown strings for use in GitHub issues or Jira ticket.
Eta.js is a templating engine that embbeds Javascript syntax into the template it self. It seems super lite weight.
When working with issues and PRs, a ton of the code we do are the message templates themselves. I think that extracting this into a template engine will clean up the business logic from the view logic (sound familiar 😉).
The strongest argument I can come up with, besides how the code looks, to use templates for issue and PR bodies, as well as comments is removing string concatanation from our code. I'm of the opinion that this will cut down on future fomatting issues.