Refactor webhook and fix feishu/lark secret (#34961)

This commit is contained in:
wxiaoguang authored and GitHub committed 2025-07-06 06:04:08 +00:00
1 parent 3533263ced
commit e0745eb14d
22 files changed
+96 -78

No files matched your search

+1 -2
View File
@@ -238,6 +238,7 @@ type WebhookForm struct {
Active bool
BranchFilter string `binding:"GlobPattern"`
AuthorizationHeader string
Secret string
}
// PushOnly if the hook will be triggered when push
@@ -260,7 +261,6 @@ type NewWebhookForm struct {
PayloadURL string `binding:"Required;ValidUrl"`
HTTPMethod string `binding:"Required;In(POST,GET)"`
ContentType int `binding:"Required"`
Secret string
WebhookForm
}
@@ -274,7 +274,6 @@ func (f *NewWebhookForm) Validate(req *http.Request, errs binding.Errors) bindin
type NewGogshookForm struct {
PayloadURL string `binding:"Required;ValidUrl"`
ContentType int `binding:"Required"`
Secret string
WebhookForm
}