Skip to content

Wbezuide/markdown rendering check

Warren Gifford requested to merge wbezuide/markdown-rendering-check into main

Created by: burmudar

The fix here fixes the output seen https://buildkite.com/sourcegraph/sourcegraph/builds/156267#0181916f-7bce-42a5-b441-2fab90756442 to be less horrible and confusing. It's not perfect but will work for now.

I experimented with quite a few approaches to get the rendering right of the diff to look how it would look in a terminal, but the markdown rendering doesn't seem to work for term as it requires to be diff. The fix here at least fixes the annotation so that it can be used in the annotation printing work.

My current thinking here that a check should return a Result or Report or Output that has a message, output and type. Something like this

type Result struct {
   CheckName string
   ContentType string // probaby a better name but default would be "term"
   RawOutput string
   Message string // the title or message before the content is printed
}

By returning something like the above, it allows us to decide how to render it by inspecting the result, and it can also be used to return a diagnostic report 🤔

Test plan

Tested on main-dry-run https://buildkite.com/sourcegraph/sourcegraph/builds/156464#01819575-2b0a-4fc6-a3c5-486ee1cfe509

Merge request reports

Loading