new create webhook event

This commit is contained in:
Unknwon 2015-08-28 23:36:13 +08:00
parent a541ca16b6
commit f509c59ac1
16 changed files with 449 additions and 306 deletions

View file

@ -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 {

File diff suppressed because one or more lines are too long