mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-20 14:00:04 +02:00
new create webhook UI
This commit is contained in:
parent
2881456421
commit
4217c2333c
21 changed files with 307 additions and 273 deletions
|
@ -65,13 +65,17 @@ func (f *RepoSettingForm) Validate(ctx *macaron.Context, errs binding.Errors) bi
|
|||
// \__/\ / \___ >___ /___| /___| /\____/|__|_ \
|
||||
// \/ \/ \/ \/ \/ \/
|
||||
|
||||
type WebhookForm struct {
|
||||
HookType string `binding:"Required"`
|
||||
PushOnly bool
|
||||
Active bool
|
||||
}
|
||||
|
||||
type NewWebhookForm struct {
|
||||
HookTaskType string `form:"hook_type" binding:"Required"`
|
||||
PayloadUrl string `form:"payload_url" binding:"Required;Url"`
|
||||
ContentType string `form:"content_type" binding:"Required"`
|
||||
Secret string `form:"secret"`
|
||||
PushOnly bool `form:"push_only"`
|
||||
Active bool `form:"active"`
|
||||
PayloadURL string `binding:"Required;Url"`
|
||||
ContentType int `binding:"Required"`
|
||||
Secret string
|
||||
WebhookForm
|
||||
}
|
||||
|
||||
func (f *NewWebhookForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
|
||||
|
@ -79,11 +83,9 @@ func (f *NewWebhookForm) Validate(ctx *macaron.Context, errs binding.Errors) bin
|
|||
}
|
||||
|
||||
type NewSlackHookForm struct {
|
||||
HookTaskType string `form:"hook_type" binding:"Required"`
|
||||
PayloadUrl string `form:"payload_url" binding:"Required`
|
||||
Channel string `form:"channel" binding:"Required"`
|
||||
PushOnly bool `form:"push_only"`
|
||||
Active bool `form:"active"`
|
||||
PayloadURL string `binding:"Required`
|
||||
Channel string `binding:"Required"`
|
||||
WebhookForm
|
||||
}
|
||||
|
||||
func (f *NewSlackHookForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue