@@ -198,7 +198,6 @@ type webhookParams struct {
198
198
199
199
URL string
200
200
ContentType webhook.HookContentType
201
- Secret string
202
201
HTTPMethod string
203
202
WebhookForm forms.WebhookForm
204
203
Meta any
@@ -237,7 +236,7 @@ func createWebhook(ctx *context.Context, params webhookParams) {
237
236
URL : params .URL ,
238
237
HTTPMethod : params .HTTPMethod ,
239
238
ContentType : params .ContentType ,
240
- Secret : params .Secret ,
239
+ Secret : params .WebhookForm . Secret ,
241
240
HookEvent : ParseHookEvent (params .WebhookForm ),
242
241
IsActive : params .WebhookForm .Active ,
243
242
Type : params .Type ,
@@ -290,7 +289,7 @@ func editWebhook(ctx *context.Context, params webhookParams) {
290
289
291
290
w .URL = params .URL
292
291
w .ContentType = params .ContentType
293
- w .Secret = params .Secret
292
+ w .Secret = params .WebhookForm . Secret
294
293
w .HookEvent = ParseHookEvent (params .WebhookForm )
295
294
w .IsActive = params .WebhookForm .Active
296
295
w .HTTPMethod = params .HTTPMethod
@@ -336,7 +335,6 @@ func giteaHookParams(ctx *context.Context) webhookParams {
336
335
Type : webhook_module .GITEA ,
337
336
URL : form .PayloadURL ,
338
337
ContentType : contentType ,
339
- Secret : form .Secret ,
340
338
HTTPMethod : form .HTTPMethod ,
341
339
WebhookForm : form .WebhookForm ,
342
340
}
@@ -364,7 +362,6 @@ func gogsHookParams(ctx *context.Context) webhookParams {
364
362
Type : webhook_module .GOGS ,
365
363
URL : form .PayloadURL ,
366
364
ContentType : contentType ,
367
- Secret : form .Secret ,
368
365
WebhookForm : form .WebhookForm ,
369
366
}
370
367
}
0 commit comments