From 6d85b9c3a13bcd1afd120d35ea4eec26d357fe13 Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Tue, 3 Oct 2023 19:23:32 -0700 Subject: [PATCH] Fix formatting Signed-off-by: Tamal Saha --- pkg/backend/status.go | 9 +++------ pkg/cmds/webhook.go | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/pkg/backend/status.go b/pkg/backend/status.go index 6c8b0dbc..965bc888 100644 --- a/pkg/backend/status.go +++ b/pkg/backend/status.go @@ -171,8 +171,7 @@ func ReportStatus(nc *nats.Conn, name string, s Status, comments ...string) { func (sp *StatusReporter) GenerateMarkdownReport() ([]byte, error) { var buf bytes.Buffer - buf.WriteString("## Runners") - buf.WriteRune('\n') + buf.WriteString("## Runners\n\n") buf.Write(sp.renderRunnerInfo()) buf.WriteRune('\n') @@ -184,8 +183,7 @@ func (sp *StatusReporter) GenerateMarkdownReport() ([]byte, error) { if err != nil { return nil, err } - buf.WriteString("## Streams") - buf.WriteRune('\n') + buf.WriteString("## Streams\n\n") buf.Write(RenderStreamInfo(streams)) buf.WriteRune('\n') @@ -194,8 +192,7 @@ func (sp *StatusReporter) GenerateMarkdownReport() ([]byte, error) { if err != nil { return nil, err } - buf.WriteString(fmt.Sprintf("## Consumers for Stream: %s\n", name)) - buf.WriteRune('\n') + buf.WriteString(fmt.Sprintf("## Consumers for Stream: %s\n\n", name)) buf.Write(RenderConsumerInfo(consumers)) buf.WriteRune('\n') } diff --git a/pkg/cmds/webhook.go b/pkg/cmds/webhook.go index b796eec9..be22219e 100644 --- a/pkg/cmds/webhook.go +++ b/pkg/cmds/webhook.go @@ -137,7 +137,7 @@ func runServer(gh *github.Client, nc *nats.Conn, sp *backend.StatusReporter) err }) r.Get("/runner-status", func(w http.ResponseWriter, r *http.Request) { - data, err := sp.GenerateHTMLReport() + data, err := sp.GenerateMarkdownReport() if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return