1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Move webhook to a standalone package under modules (#8747)

* Move webhook to a standalone package under modules

* fix test

* fix comments
This commit is contained in:
Lunny Xiao
2019-11-02 06:51:22 +08:00
committed by zeripath
parent ba336f6f45
commit 0e7f7df3cf
20 changed files with 570 additions and 478 deletions

View File

@@ -23,6 +23,7 @@ import (
"code.gitea.io/gitea/modules/notification"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/util"
"code.gitea.io/gitea/modules/webhook"
"code.gitea.io/gitea/services/gitdiff"
pull_service "code.gitea.io/gitea/services/pull"
repo_service "code.gitea.io/gitea/services/repository"
@@ -823,7 +824,7 @@ func TriggerTask(ctx *context.Context) {
log.Trace("TriggerTask '%s/%s' by %s", repo.Name, branch, pusher.Name)
go models.HookQueue.Add(repo.ID)
go webhook.HookQueue.Add(repo.ID)
go pull_service.AddTestPullRequestTask(pusher, repo.ID, branch, true)
ctx.Status(202)
}