mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-30 10:11:23 +02:00
temp workaround to get Drone correctly stream SSE events
This commit is contained in:
parent
27aadca029
commit
b3951043a0
@ -2,6 +2,7 @@ package server
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"encoding/json"
|
||||
"io"
|
||||
"net/http"
|
||||
"strconv"
|
||||
@ -54,7 +55,9 @@ func GetRepoEvents(c *gin.Context) {
|
||||
}
|
||||
if event.Kind == eventbus.EventRepo &&
|
||||
event.Name == repo.FullName {
|
||||
c.SSEvent("message", event.Msg)
|
||||
d := map[string]interface{}{}
|
||||
json.Unmarshal(event.Msg, &d)
|
||||
c.SSEvent("message", d)
|
||||
}
|
||||
|
||||
return true
|
||||
|
Loading…
Reference in New Issue
Block a user