runatlantis / atlantis

Terraform Pull Request Automation
https://www.runatlantis.io
Other
7.68k stars 1.05k forks source link

Question: where in codebase is terraform plan sent to GitHub PR via pulls api? #1999

Open bpgould opened 2 years ago

bpgould commented 2 years ago

I am running terraform builds in Travis, and I have the GH pulls api working to comment on PRs, but now I need to figure out how to send the terraform plan over the api and maintain formatting. Currently I am piping the plan to a .txt file and reading that in. I cannot use terraform show -json due to needing -refresh=false.

If you can point me to the implementation of the plan being sent to the pulls api here, that would be helpful!

bpgould commented 2 years ago

This is the closest thing that I could find: https://github.com/runatlantis/atlantis/blob/master/server/events/pull_updater.go

GenPage commented 2 years ago

@bpgould That file is where the code runs to comment on the Pull request, its referenced by the command runners