atlantis icon indicating copy to clipboard operation
atlantis copied to clipboard

Add custom template support for GitHub PR comments

Open ribejara-te opened this issue 3 years ago • 0 comments

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Describe the user story

We would like to modify the format of our GitHub PR comments to suit our needs.

Describe the solution you'd like

We like Prometheus' model for templating. They include default templates for all messages, but we can override them to our liking. Everyone else's PR comments stay the same, while we get the ability to tune ours.

Describe the drawbacks of your solution

Perhaps we'd have to document the data structure passed to templates so that users know what they can use within their own templates. But otherwise, the system should be simple to implement and maintain.

Describe alternatives you've considered

  • Changing the current format, disregarded because we assume nobody wants their comment format changed to ours.
  • Adding our format alongside the default one, and adding a flag/envvar to use ours, again, bad idea IMO
  • Modifying the current binary's data section to override the current template. Not only is this a terrible idea but it also must preserve the same binary length, which would limit our freedom to change it.

ribejara-te avatar Aug 31 '22 14:08 ribejara-te