Open nitrocode opened 2 years ago
Hi @nitrocode Thanks for the issue. I agree, we can use https://github.com/cloudposse/github-commenter/ for adding comments to PR.
Like:
tf-summarize -tree tfplan | github-commenter -format "Output from `terraform plan summary:`<br/>```{{.}}```"
I assume there is not code change in tf-summarize for it. Please correct me if my understanding is wrong.
Next steps:
I used another workflow to comment the summary in the PR https://github.com/dineshba/tf-summarize#comment-terraform-plan-summary-in-prs
That's handy if the terraform workflows are in github actions but I don't think that method would work from an atlantis workflow
Hi. I like your command line utility a lot.
I use atlantis for gh terraform workflows and I would love to integrate this app with atlantis similar to infracosts latest setup.
https://github.com/infracost/infracost-atlantis/blob/master/examples/combined-infracost-comment/README.md
Excerpt from above
It would be awesome if tf-summarize could follow the same spec so it can be integrated the same way 😄
Infracost is also a golang lib and I'd be curious if its libraries could be reused to support the gh commenter (and maybe even the other VCSs)
https://github.com/infracost/infracost
Actually, after some additional research it looks like infracost put a lot of its comment logic in its internal subdirectory making it impossible to use as a library.
I did come across this command line utility that could be used instead of building a subcommand.
https://github.com/cloudposse/github-commenter/