diggerhq / digger

Digger is an open source IaC orchestration tool. Digger allows you to run IaC in your existing CI pipeline ⚡️
https://digger.dev
Apache License 2.0
4.29k stars 577 forks source link

Add the ability to add prefix to comment output #1716

Open ben-of-codecraft opened 1 month ago

ben-of-codecraft commented 1 month ago

Feature Request

Currently, Digger supports $DIGGER_OUT in workflow custom steps to display output back into the PR comment. This is put into a section block Additional Outputs which is hidden by default.

I would like there to be a way to target a different output variable to prepend before any other comment output. We have done this with security scanning using a custom variable called $DIGGER_PREFIX_OUT. Here is an example image of the output comment using $DIGGER_PREFIX_OUT instead of $DIGGER_OUT:

This would provide more power to customizing the information in the PR to the user for custom extension on top of Digger (security, format, cost, etc) image

motatoes commented 1 month ago

Regarding this and #1715 I heard a feature request to introduce some sort of templating override for powerusers who want to structure their comments in different ways. Perhaps a "digger.mustache.tpl" file that lives somewhere and instrucructs digger what to include in the outputs somehow. Unformed thoughts, but it seems that its inevetible to allow for powerusers of comments to customise them heavily

ben-of-codecraft commented 5 days ago

I think some type of templating built in for display would be a welcomed addition.