diff options
author | Unknwon <u@gogs.io> | 2015-08-28 23:36:13 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-08-28 23:36:13 +0800 |
commit | f509c59ac13dffdff6a246572de04150ee295314 (patch) | |
tree | 3be3923779cedce3058f28f1d32604226985be03 /modules/auth/repo_form.go | |
parent | a541ca16b67d492340ac55b84ff190d2a52fc39d (diff) | |
download | gitea-f509c59ac13dffdff6a246572de04150ee295314.tar.gz gitea-f509c59ac13dffdff6a246572de04150ee295314.zip |
new create webhook event
Diffstat (limited to 'modules/auth/repo_form.go')
-rw-r--r-- | modules/auth/repo_form.go | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/modules/auth/repo_form.go b/modules/auth/repo_form.go index 748bfa6111..cf713c0cbd 100644 --- a/modules/auth/repo_form.go +++ b/modules/auth/repo_form.go @@ -67,8 +67,22 @@ func (f *RepoSettingForm) Validate(ctx *macaron.Context, errs binding.Errors) bi // \/ \/ \/ \/ \/ \/ type WebhookForm struct { - PushOnly bool - Active bool + Events string + Create bool + Push bool + Active bool +} + +func (f WebhookForm) PushOnly() bool { + return f.Events == "push_only" +} + +func (f WebhookForm) SendEverything() bool { + return f.Events == "send_everything" +} + +func (f WebhookForm) ChooseEvents() bool { + return f.Events == "choose_events" } type NewWebhookForm struct { |