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

Minimizing comments from the Atlantis Bot #126

Closed
reulan opened this issue May 18, 2018 · 18 comments
Closed

Minimizing comments from the Atlantis Bot #126

reulan opened this issue May 18, 2018 · 18 comments

Comments

@reulan
Copy link
Contributor

reulan commented May 18, 2018

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:

  • If two plans are issued one after another, hide the previous plan as outdated.
  • A plan followed by a failed apply, minimize both (plan + the failed apply) when the next plan is issued.
  • On successful apply where all resources are created, minimize all comments by the Atlantis bot besides the successful apply.
@lkysow
Copy link
Member

lkysow commented May 21, 2018

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.

@reulan
Copy link
Contributor Author

reulan commented May 22, 2018

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.

@mechastorm
Copy link

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.

Rendered

a
b
c
d
e
f

The Markdown syntax

<details>

```
a
b
c
d
e
f
```

</details>

@lkysow
Copy link
Member

lkysow commented May 31, 2018

Ahh interesting, so we could edit the previous plans/apply's and just add the details thing.

@lkysow
Copy link
Member

lkysow commented May 31, 2018

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

@julianvmodesto
Copy link

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.

@lkysow
Copy link
Member

lkysow commented Aug 15, 2018

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.

@julianvmodesto
Copy link

@lkysow would #203 be a good starting point for placing this behavior?

@lkysow
Copy link
Member

lkysow commented Sep 3, 2018

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.

#203 should handle the specific case of GitHub where we need to split up the comment.

@shinka81
Copy link

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.

@lkysow
Copy link
Member

lkysow commented Sep 15, 2018

Getting close to a PR:
image

@mwarkentin
Copy link
Contributor

I opened an issue for a Hide Comment API: isaacs/github#1480

Feel free to vote / send to support.

@mwarkentin
Copy link
Contributor

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.

@mwarkentin
Copy link
Contributor

Looks like this is available via graphql api: https://developer.github.com/v4/mutation/minimizecomment/

@mwarkentin
Copy link
Contributor

@lkysow thoughts on if this could be reopened with the github v4 api enabling programatic hiding?

@lkysow lkysow reopened this Jan 20, 2020
@jvperrin
Copy link

I believe with #721 closed (and more specifically #897/#994 merged) that this can be closed now too?

@mwarkentin
Copy link
Contributor

I think an option to minimize old applies would still be helpful..

@jamengual
Copy link
Contributor

already implemented

jamengual pushed a commit that referenced this issue Nov 23, 2022
meringu pushed a commit to meringu/atlantis that referenced this issue May 29, 2023
No need to use -var when running apply
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants