MCPcopy Create free account
hub / github.com/OpenCSGs/csghub-server / Handle

Method Handle

api/handler/callback/git_callback.go:28–38  ·  view source on GitHub ↗
(c *gin.Context)

Source from the content-addressed store, hash-verified

26}
27
28func (h *GitCallbackHandler) Handle(c *gin.Context) {
29 event := c.Request.Header.Get("X-Gitea-Event")
30 switch event {
31 case "push":
32 h.handlePush(c)
33 default:
34 slog.Error("Unknown git callback event", "event", event)
35 httpbase.BadRequest(c, "unknown git callback event:"+event)
36 }
37
38}
39
40func (h *GitCallbackHandler) handlePush(c *gin.Context) {
41 var req types.GiteaCallbackPushReq

Callers

nothing calls this directly

Calls 4

handlePushMethod · 0.95
BadRequestFunction · 0.92
ErrorMethod · 0.80
GetMethod · 0.45

Tested by

no test coverage detected