Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
If you are interested in working on this issue or have submitted a pull request, please leave a comment.
We utilize terragrunt-atlantis-config and as a result often have multiple (large) module plans that can be tedious to scroll through on high churn PRs. Quick and dirty solution for this is often to just close the comment-spammed PR and create new, but if atlantis were "smarter" about how it kept track of the comment threads I think we could avoid this extra step.
Describe the solution you'd like
If a new plan is triggered atlantis should hide existing plan comments with the Outdated reason.
An all or nothing approach would definitely be the easiest way to address this, but wouldn't work with scenarios where only a targeted plan is triggered in a PR with multiple workspaces in play. My assumption is that the "comment hiding" logic would need to be aware of which comments correspond to which workspace and if a plan for that workspace has already been triggered + commented on.
I've only considered scenarios where multiple plans are run for the same workspace/set of workspaces within a PR, and am not sure what how this should operate when dealing with multiple applies or if they should just be treated as out of scope.
Describe alternatives you've considered
Delete stale comments (not ideal since history/context can be lost)
Move entire contents of stale comments to a collapsible section (not sure how feasible this is)
Close + open comment-spammed PRs (manual overhead)
Community Note
Describe the user story
We utilize terragrunt-atlantis-config and as a result often have multiple (large) module plans that can be tedious to scroll through on high churn PRs. Quick and dirty solution for this is often to just close the comment-spammed PR and create new, but if atlantis were "smarter" about how it kept track of the comment threads I think we could avoid this extra step.
Describe the solution you'd like
If a new plan is triggered atlantis should hide existing plan comments with the
![image](https://github.com/runatlantis/atlantis/assets/29389186/8abe3ba7-6770-4426-b731-2594679e4047)
Outdated
reason.Describe the drawbacks of your solution
it doesn't look like there's an API for this specific operation: https://github.com/orgs/community/discussions/65914 however, there is a graphql endpoint that supports it: https://docs.github.com/en/graphql/reference/mutations#minimizecomment source
An all or nothing approach would definitely be the easiest way to address this, but wouldn't work with scenarios where only a targeted plan is triggered in a PR with multiple workspaces in play. My assumption is that the "comment hiding" logic would need to be aware of which comments correspond to which workspace and if a plan for that workspace has already been triggered + commented on.
I've only considered scenarios where multiple plans are run for the same workspace/set of workspaces within a PR, and am not sure what how this should operate when dealing with multiple applies or if they should just be treated as out of scope.
Describe alternatives you've considered