mirror of
https://github.com/go-gitea/gitea
synced 2025-08-09 19:18:20 +00:00
#835: Realtime webhooks
This commit is contained in:
@@ -190,7 +190,10 @@ func Http(ctx *middleware.Context) {
|
||||
refName := fields[2]
|
||||
|
||||
// FIXME: handle error.
|
||||
models.Update(refName, oldCommitId, newCommitId, authUsername, username, reponame, authUser.Id)
|
||||
if err = models.Update(refName, oldCommitId, newCommitId, authUsername, username, reponame, authUser.Id); err == nil {
|
||||
models.HookQueue.AddRepoID(repo.Id)
|
||||
}
|
||||
|
||||
}
|
||||
lastLine = lastLine + size
|
||||
} else {
|
||||
|
@@ -634,3 +634,7 @@ func GitHooksEditPost(ctx *middleware.Context) {
|
||||
}
|
||||
ctx.Redirect(ctx.Repo.RepoLink + "/settings/hooks/git")
|
||||
}
|
||||
|
||||
func TriggerHook(ctx *middleware.Context) {
|
||||
models.HookQueue.AddRepoID(ctx.Repo.Repository.Id)
|
||||
}
|
||||
|
Reference in New Issue
Block a user