liatrio / terraform-change-pr-commenter

GitHub Action to read changes from Terraform plan JSON, summarize changes, and post them in a GitHub Pull Request Comment
Apache License 2.0
38 stars 8 forks source link

feat: ability to hide previous comments & fix for summary issue #65

Closed DeWildeDaan closed 2 months ago

DeWildeDaan commented 2 months ago

This PR addresses some issues created for this action:

  1. fix: It addresses issue #61 My guess why this happened: on line 136 & 145 (https://github.com/liatrio/terraform-change-pr-commenter/blob/main/index.js#L131-L146) the process exits if certain conditions are met. This prevents the summary from being set. By removing the process.exit(0) lines and using a 'createComment' flag that is set to false when those conditions are met, we eliminate this 'bug'.

  2. feat: It adds the feature to hide previous comments in relation to issue #57 As mentioned in that issue, updating comments in place isn't really the best idea. So I added the option to hide/minimize previous comment created by the action. This feature is also added to the action-test.yml to test its functionality.

  3. docs: I also took the liberty to updating the README.MD, adding all (new) inputs and adding a little 'OpenTofu' section + fixing a little typo.

(I'm using my forked version of this action and it works great 😄 )

github-actions[bot] commented 2 months ago

:tada: This PR is included in version 1.6.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: