Atlantis: Formatting is broken when comments are continued on GitHub

Created on 21 Apr 2018  路  6Comments  路  Source: runatlantis/atlantis

When long Terraform plan output gets split into multiple comments on GitHub, the Markdown formatting is unrendered in the subsequent comments.

Here's a screenshot with some example output:

screen shot 2018-04-21 at 10 04 07 am

bug

All 6 comments

It seems this is due to splitting the comment _after_ the Markdown has been rendered. I'm guessing the second comment needs the triple backticks (```) that get stripped out.

Markdown rendering and comment creation are done here:

https://github.com/runatlantis/atlantis/blob/5d1722be709701608cc117297b6d5fbd0778f728/server/events/command_handler.go#L201-L202

Splitting is done here:

https://github.com/runatlantis/atlantis/blob/5d1722be709701608cc117297b6d5fbd0778f728/server/events/vcs/github_client.go#L93-L99

Yes my initial solution was a bit hacky. This needs to be cleaned up.

Looks like this needs to take into account https://github.com/runatlantis/atlantis/issues/251. For long outputs spread across 2 comments, I have seen that the first output renders okay and is in a collapsed block (as implemented in https://github.com/runatlantis/atlantis/issues/251), but the second comment is not formatted nicely, as in this issue.

I'm seeing the same behavior as @julianvmodesto

Ya its a known issue not sure the priority /cc @lkysow

If anyone has bandwidth to take a look that would be great. https://github.com/runatlantis/atlantis/pull/203 was started but never finished.

Simply removing the Refreshing.... lines might be a quick-win and move lots of plans under the character limit.

Was this page helpful?
0 / 5 - 0 ratings