summaryrefslogtreecommitdiffstats
path: root/routers/repo/webhook.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2018-05-16 22:01:55 +0800
committerGitHub <noreply@github.com>2018-05-16 22:01:55 +0800
commit24941a10464dc27eaebafda2a208fa827b74ff8d (patch)
treec875dd6b7d659e2dbd926dbd3a04a036f9f41c94 /routers/repo/webhook.go
parent188fe6c301f9c44d569b75cb339d6a6b3f6e03ad (diff)
downloadgitea-24941a10464dc27eaebafda2a208fa827b74ff8d.tar.gz
gitea-24941a10464dc27eaebafda2a208fa827b74ff8d.zip
Add more webhooks support and refactor webhook templates directory (#3929)
* add more webhook support * move hooks templates to standalone dir and add more webhooks ui * fix tests * update vendor checksum * add more webhook support * move hooks templates to standalone dir and add more webhooks ui * fix tests * update vendor checksum * update vendor Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> * load attributes when created release * update comparsion doc
Diffstat (limited to 'routers/repo/webhook.go')
-rw-r--r--routers/repo/webhook.go19
1 files changed, 12 insertions, 7 deletions
diff --git a/routers/repo/webhook.go b/routers/repo/webhook.go
index 35fdf796b5..6994aa3344 100644
--- a/routers/repo/webhook.go
+++ b/routers/repo/webhook.go
@@ -23,9 +23,9 @@ import (
)
const (
- tplHooks base.TplName = "repo/settings/hooks"
- tplHookNew base.TplName = "repo/settings/hook_new"
- tplOrgHookNew base.TplName = "org/settings/hook_new"
+ tplHooks base.TplName = "repo/settings/webhook/base"
+ tplHookNew base.TplName = "repo/settings/webhook/new"
+ tplOrgHookNew base.TplName = "org/settings/webhook/new"
)
// Webhooks render web hooks list page
@@ -118,10 +118,15 @@ func ParseHookEvent(form auth.WebhookForm) *models.HookEvent {
SendEverything: form.SendEverything(),
ChooseEvents: form.ChooseEvents(),
HookEvents: models.HookEvents{
- Create: form.Create,
- Push: form.Push,
- PullRequest: form.PullRequest,
- Repository: form.Repository,
+ Create: form.Create,
+ Delete: form.Delete,
+ Fork: form.Fork,
+ Issues: form.Issues,
+ IssueComment: form.IssueComment,
+ Release: form.Release,
+ Push: form.Push,
+ PullRequest: form.PullRequest,
+ Repository: form.Repository,
},
}
}