feat: enhance SSE handling and API integration with improved event streaming and buffering configurations

This commit is contained in:
patel-lyzr
2026-05-13 22:15:08 +05:30
parent b6647a537d
commit f526f18278
9 changed files with 256 additions and 85 deletions
+8 -2
View File
@@ -538,13 +538,19 @@ func (s *Server) handleGitHubWebhook(w http.ResponseWriter, r *http.Request) {
return
}
// Normalize the ref to the bare branch name (`main`, not `refs/heads/main`)
// so downstream nodes — particularly Build's git clone --branch — don't
// have to know about Git's internal ref namespace. `fullRef` is kept for
// nodes that want the original.
branch := github.BranchFromRef(push.Ref)
trigger := []map[string]any{{
"source": "github_push",
"agentId": a.ID,
"agentName": a.Name,
"repoUrl": a.RepoURL,
"ref": push.Ref,
"branch": github.BranchFromRef(push.Ref),
"ref": branch,
"branch": branch,
"fullRef": push.Ref,
"commit": push.After,
"pusher": push.Pusher.Name,
}}