Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Oct 4, 2023
1 parent 7e43564 commit 6d85b9c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 deletions pkg/backend/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand All @@ -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')

Expand All @@ -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')
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmds/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6d85b9c

Please sign in to comment.