Skip to content
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: ability to hide previous comments & fix for summary issue #65

Merged
merged 82 commits into from
Sep 3, 2024

Conversation

DeWildeDaan
Copy link
Contributor

@DeWildeDaan DeWildeDaan commented Aug 30, 2024

This PR addresses some issues created for this action:

  1. fix: It addresses issue non-Pull Request workflows causing warning and no plan is posted to the job summary #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 Update existing comment in place #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 😄 )

DeWildeDaan and others added 30 commits August 30, 2024 10:12
fix: moving pr comment code to pull request check and removing exits
fix: adding bool flag to add comment instead of exiting early
DeWildeDaan and others added 25 commits August 30, 2024 13:59
chore: removed action commiting the dist folder
Copy link
Contributor

@jburns24 jburns24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed and tested the fork locally. I have verified that these changes do in fact resolve issue #61 and the hide-previous-comments feature works as intended. I agree with this approach for #57 as it maintains the comment history. Almost in favor of this defaulting to true

@DeWildeDaan Thank you for the well authored contribution.

@jburns24 jburns24 merged commit 08ba12c into liatrio:main Sep 3, 2024
4 of 5 checks passed
github-actions bot pushed a commit that referenced this pull request Sep 3, 2024
# [1.6.0](v1.5.0...v1.6.0) (2024-09-03)

### Features

* ability to hide previous comments & fix for summary issue ([#65](#65)) ([08ba12c](08ba12c))
Copy link

github-actions bot commented Sep 3, 2024

🎉 This PR is included in version 1.6.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants