diff options
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 { |