As an Atlantis user certain PR's can get very difficult to read when going through the posted plans and apply failure/success posted by the Atlantis bot.
Last month GitHub released a feature which allows a user to collapse comments within a Pull Request. https://help.github.com/articles/managing-disruptive-comments/
This would be great for PR's where the HCL is not 100% and is undergoing an atlantis plan/apply then debug workflow.
I would propose to auto hide messages in the following settings:
I really like this idea! Unfortunately I just looked and I can't find any API to hide comments: https://developer.github.com/v3/issues/comments/
I was thinking about just editing the previous comment in the case of "two plans are issued one after another" and putting the new plan. That would reduce a lot of the comment spam.
Definitely! Your method of editing comments is sufficient, as it still reduces the clutter and gets around the suggested feature not being included in the API as of yet.
The other suggestion that would be related is to help reduce the length of a comment of using collapsable markdown sections? Though I believe this is a Github specific feature. Gitlab may not support this.
b
c
d
e
f
````
b
c
d
e
f
````
Ahh interesting, so we could edit the previous plans/apply's and just add the details thing.
It works on GitLab with:
<details>
<summary>Click me to collapse/fold.</summary>
These details will remain hidden until expanded.
<pre><code>PASTE LOGS HERE</code></pre>
</details>
So you can't use markdown within the <details></details> tags but the above also works with GitHub! So it's do-able.
Click me to collapse/fold.
These details will remain hidden until expanded.
PASTE LOGS HERE
Could we wrap the logs as a collapsible block by default always for now? That would be a nice improvement without editing the previous plans/applys.
You mean the plan/apply output? Yeah that's a pretty good idea. But I'd like to do it only if it's over a certain number of lines. If it's a small plan/apply output it's annoying to have to click the Expand button.
@lkysow would #203 be a good starting point for placing this behavior?
No I think they're separate. The markdown_renderer should detect the plan output is over 'n' lines long and wrap it in the markdown that makes it expandable.
I like the idea of defaulting to wrapping plan/apply output if text is over 'n' lines but I think it would be useful to have a configuration on atlantis to auto-collapse all TF plan/apply's in case a user prefers that.
Getting close to a PR:

I opened an issue for a Hide Comment API: https://github.com/isaacs/github/issues/1480
Feel free to vote / send to support.
Thanks for your feedback! We're always working to improve GitHub and we consider every suggestion we receive. I don't show that we are planning to offer a way to minimize comments through the API this year, but I have added it to our internal Feature Request List.
We can't say if/when we may add a feature, however your feedback has definitely been recorded.
Looks like this is available via graphql api: https://developer.github.com/v4/mutation/minimizecomment/
@lkysow thoughts on if this could be reopened with the github v4 api enabling programatic hiding?
I believe with #721 closed (and more specifically #897/#994 merged) that this can be closed now too?
I think an option to minimize old applies would still be helpful..
Most helpful comment
It works on GitLab with:
So you can't use markdown within the
<details></details>tags but the above also works with GitHub! So it's do-able.Click me to collapse/fold.
These details will remain hidden until expanded.