@@ -264,7 +264,6 @@ func GiteaHooksNewPost(ctx *context.Context) {
264264 HTTPMethod : form .HTTPMethod ,
265265 WebhookForm : form .WebhookForm ,
266266 Type : webhook .GITEA ,
267- Meta : nil ,
268267 })
269268}
270269
@@ -281,10 +280,8 @@ func GogsHooksNewPost(ctx *context.Context) {
281280 URL : form .PayloadURL ,
282281 ContentType : contentType ,
283282 Secret : form .Secret ,
284- HTTPMethod : "" ,
285283 WebhookForm : form .WebhookForm ,
286284 Type : webhook .GOGS ,
287- Meta : nil ,
288285 })
289286}
290287
@@ -295,8 +292,6 @@ func DiscordHooksNewPost(ctx *context.Context) {
295292 createWebhook (ctx , webhookCreationParams {
296293 URL : form .PayloadURL ,
297294 ContentType : webhook .ContentTypeJSON ,
298- Secret : "" ,
299- HTTPMethod : "" ,
300295 WebhookForm : form .WebhookForm ,
301296 Type : webhook .DISCORD ,
302297 Meta : & webhook_service.DiscordMeta {
@@ -313,11 +308,8 @@ func DingtalkHooksNewPost(ctx *context.Context) {
313308 createWebhook (ctx , webhookCreationParams {
314309 URL : form .PayloadURL ,
315310 ContentType : webhook .ContentTypeJSON ,
316- Secret : "" ,
317- HTTPMethod : "" ,
318311 WebhookForm : form .WebhookForm ,
319312 Type : webhook .DINGTALK ,
320- Meta : nil ,
321313 })
322314}
323315
@@ -328,8 +320,6 @@ func TelegramHooksNewPost(ctx *context.Context) {
328320 createWebhook (ctx , webhookCreationParams {
329321 URL : fmt .Sprintf ("https://api.telegram.org/bot%s/sendMessage?chat_id=%s" , url .PathEscape (form .BotToken ), url .QueryEscape (form .ChatID )),
330322 ContentType : webhook .ContentTypeJSON ,
331- Secret : "" ,
332- HTTPMethod : "" ,
333323 WebhookForm : form .WebhookForm ,
334324 Type : webhook .TELEGRAM ,
335325 Meta : & webhook_service.TelegramMeta {
@@ -346,8 +336,7 @@ func MatrixHooksNewPost(ctx *context.Context) {
346336 createWebhook (ctx , webhookCreationParams {
347337 URL : fmt .Sprintf ("%s/_matrix/client/r0/rooms/%s/send/m.room.message" , form .HomeserverURL , url .PathEscape (form .RoomID )),
348338 ContentType : webhook .ContentTypeJSON ,
349- Secret : "" ,
350- HTTPMethod : "PUT" ,
339+ HTTPMethod : http .MethodPut ,
351340 WebhookForm : form .WebhookForm ,
352341 Type : webhook .MATRIX ,
353342 Meta : & webhook_service.MatrixMeta {
@@ -366,11 +355,8 @@ func MSTeamsHooksNewPost(ctx *context.Context) {
366355 createWebhook (ctx , webhookCreationParams {
367356 URL : form .PayloadURL ,
368357 ContentType : webhook .ContentTypeJSON ,
369- Secret : "" ,
370- HTTPMethod : "" ,
371358 WebhookForm : form .WebhookForm ,
372359 Type : webhook .MSTEAMS ,
373- Meta : nil ,
374360 })
375361}
376362
@@ -381,8 +367,6 @@ func SlackHooksNewPost(ctx *context.Context) {
381367 createWebhook (ctx , webhookCreationParams {
382368 URL : form .PayloadURL ,
383369 ContentType : webhook .ContentTypeJSON ,
384- Secret : "" ,
385- HTTPMethod : "" ,
386370 WebhookForm : form .WebhookForm ,
387371 Type : webhook .SLACK ,
388372 Meta : & webhook_service.SlackMeta {
@@ -401,11 +385,8 @@ func FeishuHooksNewPost(ctx *context.Context) {
401385 createWebhook (ctx , webhookCreationParams {
402386 URL : form .PayloadURL ,
403387 ContentType : webhook .ContentTypeJSON ,
404- Secret : "" ,
405- HTTPMethod : "" ,
406388 WebhookForm : form .WebhookForm ,
407389 Type : webhook .FEISHU ,
408- Meta : nil ,
409390 })
410391}
411392
@@ -416,11 +397,8 @@ func WechatworkHooksNewPost(ctx *context.Context) {
416397 createWebhook (ctx , webhookCreationParams {
417398 URL : form .PayloadURL ,
418399 ContentType : webhook .ContentTypeJSON ,
419- Secret : "" ,
420- HTTPMethod : "" ,
421400 WebhookForm : form .WebhookForm ,
422401 Type : webhook .WECHATWORK ,
423- Meta : nil ,
424402 })
425403}
426404
@@ -431,8 +409,6 @@ func PackagistHooksNewPost(ctx *context.Context) {
431409 createWebhook (ctx , webhookCreationParams {
432410 URL : fmt .Sprintf ("https://packagist.org/api/update-package?username=%s&apiToken=%s" , url .QueryEscape (form .Username ), url .QueryEscape (form .APIToken )),
433411 ContentType : webhook .ContentTypeJSON ,
434- Secret : "" ,
435- HTTPMethod : "" ,
436412 WebhookForm : form .WebhookForm ,
437413 Type : webhook .PACKAGIST ,
438414 Meta : & webhook_service.PackagistMeta {
0 commit comments