Browse Source

Fix invalid HTML on bot message when a branch is deleted

pull/247/head
Konstantinos Sideris 6 years ago
parent
commit
408fd35c3d
  1. 2
      src/github.com/matrix-org/go-neb/services/github/webhook/webhook.go

2
src/github.com/matrix-org/go-neb/services/github/webhook/webhook.go

@ -233,7 +233,7 @@ func pushHTMLMessage(p github.PushEvent) string {
// this branch was deleted, no HeadCommit object and deleted=true // this branch was deleted, no HeadCommit object and deleted=true
if p.HeadCommit == nil && p.Deleted != nil && *p.Deleted { if p.HeadCommit == nil && p.Deleted != nil && *p.Deleted {
return fmt.Sprintf( return fmt.Sprintf(
`[<u>%s</u>] %s <font color="red"><b>deleted</font> %s</b>`,
`[<u>%s</u>] %s <b><font color="red">deleted</font> %s</b>`,
html.EscapeString(*p.Repo.FullName), html.EscapeString(*p.Repo.FullName),
html.EscapeString(*p.Pusher.Name), html.EscapeString(*p.Pusher.Name),
html.EscapeString(branch), html.EscapeString(branch),

Loading…
Cancel
Save