diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2019-11-02 10:35:12 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-02 10:35:12 +0800 |
commit | f518fe66620bcb60a5251befca116f8caa48ee42 (patch) | |
tree | 0522717b649d6d5148e11e122048cf8629aafcfb /routers | |
parent | 4b8d9e58c58b8952e86e7e5f90a0a8e0480e1de1 (diff) | |
download | gitea-f518fe66620bcb60a5251befca116f8caa48ee42.tar.gz gitea-f518fe66620bcb60a5251befca116f8caa48ee42.zip |
Rename HookQueue to hookQueue (#8778)
* Rename HookQueue to hookQueue
* fix lint
Diffstat (limited to 'routers')
-rw-r--r-- | routers/api/v1/repo/hook.go | 2 | ||||
-rw-r--r-- | routers/repo/pull.go | 2 | ||||
-rw-r--r-- | routers/repo/webhook.go | 1 |
3 files changed, 1 insertions, 4 deletions
diff --git a/routers/api/v1/repo/hook.go b/routers/api/v1/repo/hook.go index 56fc514508..18f1fba056 100644 --- a/routers/api/v1/repo/hook.go +++ b/routers/api/v1/repo/hook.go @@ -137,7 +137,7 @@ func TestHook(ctx *context.APIContext) { ctx.Error(500, "PrepareWebhook: ", err) return } - go webhook.HookQueue.Add(ctx.Repo.Repository.ID) + ctx.Status(204) } diff --git a/routers/repo/pull.go b/routers/repo/pull.go index d28ee0cfaf..cb9c7c1164 100644 --- a/routers/repo/pull.go +++ b/routers/repo/pull.go @@ -23,7 +23,6 @@ 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" @@ -824,7 +823,6 @@ func TriggerTask(ctx *context.Context) { log.Trace("TriggerTask '%s/%s' by %s", repo.Name, branch, pusher.Name) - go webhook.HookQueue.Add(repo.ID) go pull_service.AddTestPullRequestTask(pusher, repo.ID, branch, true) ctx.Status(202) } diff --git a/routers/repo/webhook.go b/routers/repo/webhook.go index f89bce8190..a6bd3af264 100644 --- a/routers/repo/webhook.go +++ b/routers/repo/webhook.go @@ -869,7 +869,6 @@ func TestWebhook(ctx *context.Context) { ctx.Flash.Error("PrepareWebhook: " + err.Error()) ctx.Status(500) } else { - go webhook.HookQueue.Add(ctx.Repo.Repository.ID) ctx.Flash.Info(ctx.Tr("repo.settings.webhook.test_delivery_success")) ctx.Status(200) } |