diff --git a/routers/private/hook.go b/routers/private/hook.go index 40edcd9c5a116..6e8437f31b253 100644 --- a/routers/private/hook.go +++ b/routers/private/hook.go @@ -466,6 +466,8 @@ func HookPreReceive(ctx *gitea_context.PrivateContext) { }) return } + } else if strings.HasPrefix(refFullName, git.NotesRef) { + continue } else { log.Error("Unexpected ref: %s", refFullName) ctx.JSON(http.StatusInternalServerError, private.Response{