-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: make terra plan write diff to github PR #383
Conversation
Could you take it over and drive it over the finish line, especially with some real testing towards the end? |
aa5337f
to
d14933d
Compare
Currently works! But i'm still not comfortable with |
cf1f888
to
0f52ee9
Compare
0f52ee9
to
3bbd004
Compare
@oneingan Nice! I'm noticing some movement. Go for it! 🤝 |
2f4df74
to
406bfe2
Compare
i make it append multiple plans in a sticky PR comment, also passthru some cell info in TF_VAR. I move the staging area to a different directory than nix and use full fragment path to avoid conflicts. I thought is ready for review @blaggacao |
52ef13e
to
cbbd463
Compare
I (finally) made sure tests run on |
…te `kubectl.nix` and `terra.nix` - **Add `postDiffToGitHubSnippet`:** - Created a reusable snippet that handles posting unified diffs to GitHub PR comments using the `gh` CLI. - Manages existing comments by updating them or creates new ones if necessary. - **Update `kubectl.nix`:** - Replaced inline diff posting logic with the new `postDiffToGitHubSnippet`. - **Modify `terra.nix`:** - Integrated `postDiffToGitHubSnippet` into the `plan` command within the `wrap` function. - Exported `TF_VAR_fragment` and `TF_VAR_fragmentRelPath` for use in Terraform configurations. - Changed the Terraform working directory to `$PRJ_ROOT/.cache/${fragmentRelPath}/.tf` for better organization.
cbbd463
to
d2b2f53
Compare
Can you give some context on the CI failure? It might be an accidental, unrelated failure. But I lack a bit of context on that possibility. If that's the case, I'd have to apologize and fix that first. |
b90d8f7
to
ad7f6ac
Compare
ad7f6ac
to
e799c3f
Compare
Let's ignore the Mac failure, seems pretty much unrelated. I'm glad that linux is green now, thank you!
|
69271c6
to
95f198a
Compare
Hm, the nvfetcher change, adding |
95f198a
to
216d7ca
Compare
sorry i was trying to catch the macos fail, i will revert last commits then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Introduce
postDiffToGitHubSnippet
for unified diff posting and updatekubectl.nix
andterra.nix
Add
postDiffToGitHubSnippet
:gh
CLI.Update
kubectl.nix
:postDiffToGitHubSnippet
.Modify
terra.nix
:postDiffToGitHubSnippet
into theplan
command within thewrap
function.TF_VAR_fragment
andTF_VAR_fragmentRelPath
for use in Terraform configurations.$PRJ_ROOT/.cache/${fragmentRelPath}/.tf
for better organization.