@@ -198,7 +198,6 @@ type webhookParams struct {
198198
199199	URL          string 
200200	ContentType  webhook.HookContentType 
201- 	Secret       string 
202201	HTTPMethod   string 
203202	WebhookForm  forms.WebhookForm 
204203	Meta         any 
@@ -237,7 +236,7 @@ func createWebhook(ctx *context.Context, params webhookParams) {
237236		URL :             params .URL ,
238237		HTTPMethod :      params .HTTPMethod ,
239238		ContentType :     params .ContentType ,
240- 		Secret :          params .Secret ,
239+ 		Secret :          params .WebhookForm . Secret ,
241240		HookEvent :       ParseHookEvent (params .WebhookForm ),
242241		IsActive :        params .WebhookForm .Active ,
243242		Type :            params .Type ,
@@ -290,7 +289,7 @@ func editWebhook(ctx *context.Context, params webhookParams) {
290289
291290	w .URL  =  params .URL 
292291	w .ContentType  =  params .ContentType 
293- 	w .Secret  =  params .Secret 
292+ 	w .Secret  =  params .WebhookForm . Secret 
294293	w .HookEvent  =  ParseHookEvent (params .WebhookForm )
295294	w .IsActive  =  params .WebhookForm .Active 
296295	w .HTTPMethod  =  params .HTTPMethod 
@@ -336,7 +335,6 @@ func giteaHookParams(ctx *context.Context) webhookParams {
336335		Type :        webhook_module .GITEA ,
337336		URL :         form .PayloadURL ,
338337		ContentType : contentType ,
339- 		Secret :      form .Secret ,
340338		HTTPMethod :  form .HTTPMethod ,
341339		WebhookForm : form .WebhookForm ,
342340	}
@@ -364,7 +362,6 @@ func gogsHookParams(ctx *context.Context) webhookParams {
364362		Type :        webhook_module .GOGS ,
365363		URL :         form .PayloadURL ,
366364		ContentType : contentType ,
367- 		Secret :      form .Secret ,
368365		WebhookForm : form .WebhookForm ,
369366	}
370367}
0 commit comments