@@ -264,7 +264,6 @@ func GiteaHooksNewPost(ctx *context.Context) {
264
264
HTTPMethod : form .HTTPMethod ,
265
265
WebhookForm : form .WebhookForm ,
266
266
Type : webhook .GITEA ,
267
- Meta : nil ,
268
267
})
269
268
}
270
269
@@ -281,10 +280,8 @@ func GogsHooksNewPost(ctx *context.Context) {
281
280
URL : form .PayloadURL ,
282
281
ContentType : contentType ,
283
282
Secret : form .Secret ,
284
- HTTPMethod : "" ,
285
283
WebhookForm : form .WebhookForm ,
286
284
Type : webhook .GOGS ,
287
- Meta : nil ,
288
285
})
289
286
}
290
287
@@ -295,8 +292,6 @@ func DiscordHooksNewPost(ctx *context.Context) {
295
292
createWebhook (ctx , webhookCreationParams {
296
293
URL : form .PayloadURL ,
297
294
ContentType : webhook .ContentTypeJSON ,
298
- Secret : "" ,
299
- HTTPMethod : "" ,
300
295
WebhookForm : form .WebhookForm ,
301
296
Type : webhook .DISCORD ,
302
297
Meta : & webhook_service.DiscordMeta {
@@ -313,11 +308,8 @@ func DingtalkHooksNewPost(ctx *context.Context) {
313
308
createWebhook (ctx , webhookCreationParams {
314
309
URL : form .PayloadURL ,
315
310
ContentType : webhook .ContentTypeJSON ,
316
- Secret : "" ,
317
- HTTPMethod : "" ,
318
311
WebhookForm : form .WebhookForm ,
319
312
Type : webhook .DINGTALK ,
320
- Meta : nil ,
321
313
})
322
314
}
323
315
@@ -328,8 +320,6 @@ func TelegramHooksNewPost(ctx *context.Context) {
328
320
createWebhook (ctx , webhookCreationParams {
329
321
URL : fmt .Sprintf ("https://api.telegram.org/bot%s/sendMessage?chat_id=%s" , url .PathEscape (form .BotToken ), url .QueryEscape (form .ChatID )),
330
322
ContentType : webhook .ContentTypeJSON ,
331
- Secret : "" ,
332
- HTTPMethod : "" ,
333
323
WebhookForm : form .WebhookForm ,
334
324
Type : webhook .TELEGRAM ,
335
325
Meta : & webhook_service.TelegramMeta {
@@ -346,8 +336,7 @@ func MatrixHooksNewPost(ctx *context.Context) {
346
336
createWebhook (ctx , webhookCreationParams {
347
337
URL : fmt .Sprintf ("%s/_matrix/client/r0/rooms/%s/send/m.room.message" , form .HomeserverURL , url .PathEscape (form .RoomID )),
348
338
ContentType : webhook .ContentTypeJSON ,
349
- Secret : "" ,
350
- HTTPMethod : "PUT" ,
339
+ HTTPMethod : http .MethodPut ,
351
340
WebhookForm : form .WebhookForm ,
352
341
Type : webhook .MATRIX ,
353
342
Meta : & webhook_service.MatrixMeta {
@@ -366,11 +355,8 @@ func MSTeamsHooksNewPost(ctx *context.Context) {
366
355
createWebhook (ctx , webhookCreationParams {
367
356
URL : form .PayloadURL ,
368
357
ContentType : webhook .ContentTypeJSON ,
369
- Secret : "" ,
370
- HTTPMethod : "" ,
371
358
WebhookForm : form .WebhookForm ,
372
359
Type : webhook .MSTEAMS ,
373
- Meta : nil ,
374
360
})
375
361
}
376
362
@@ -381,8 +367,6 @@ func SlackHooksNewPost(ctx *context.Context) {
381
367
createWebhook (ctx , webhookCreationParams {
382
368
URL : form .PayloadURL ,
383
369
ContentType : webhook .ContentTypeJSON ,
384
- Secret : "" ,
385
- HTTPMethod : "" ,
386
370
WebhookForm : form .WebhookForm ,
387
371
Type : webhook .SLACK ,
388
372
Meta : & webhook_service.SlackMeta {
@@ -401,11 +385,8 @@ func FeishuHooksNewPost(ctx *context.Context) {
401
385
createWebhook (ctx , webhookCreationParams {
402
386
URL : form .PayloadURL ,
403
387
ContentType : webhook .ContentTypeJSON ,
404
- Secret : "" ,
405
- HTTPMethod : "" ,
406
388
WebhookForm : form .WebhookForm ,
407
389
Type : webhook .FEISHU ,
408
- Meta : nil ,
409
390
})
410
391
}
411
392
@@ -416,11 +397,8 @@ func WechatworkHooksNewPost(ctx *context.Context) {
416
397
createWebhook (ctx , webhookCreationParams {
417
398
URL : form .PayloadURL ,
418
399
ContentType : webhook .ContentTypeJSON ,
419
- Secret : "" ,
420
- HTTPMethod : "" ,
421
400
WebhookForm : form .WebhookForm ,
422
401
Type : webhook .WECHATWORK ,
423
- Meta : nil ,
424
402
})
425
403
}
426
404
@@ -431,8 +409,6 @@ func PackagistHooksNewPost(ctx *context.Context) {
431
409
createWebhook (ctx , webhookCreationParams {
432
410
URL : fmt .Sprintf ("https://packagist.org/api/update-package?username=%s&apiToken=%s" , url .QueryEscape (form .Username ), url .QueryEscape (form .APIToken )),
433
411
ContentType : webhook .ContentTypeJSON ,
434
- Secret : "" ,
435
- HTTPMethod : "" ,
436
412
WebhookForm : form .WebhookForm ,
437
413
Type : webhook .PACKAGIST ,
438
414
Meta : & webhook_service.PackagistMeta {
0 commit comments