(c *gin.Context)
| 26 | } |
| 27 | |
| 28 | func (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 | |
| 40 | func (h *GitCallbackHandler) handlePush(c *gin.Context) { |
| 41 | var req types.GiteaCallbackPushReq |
nothing calls this directly
no test coverage detected