@@ -208,7 +208,7 @@ func GiteaHooksNewPost(ctx *context.Context, form auth.NewWebhookForm) {
208208 Secret : form .Secret ,
209209 HookEvent : ParseHookEvent (form .WebhookForm ),
210210 IsActive : form .Active ,
211- HookTaskType : models .GITEA ,
211+ Type : models .GITEA ,
212212 OrgID : orCtx .OrgID ,
213213 IsSystemWebhook : orCtx .IsSystemWebhook ,
214214 }
@@ -261,7 +261,7 @@ func newGogsWebhookPost(ctx *context.Context, form auth.NewGogshookForm, kind mo
261261 Secret : form .Secret ,
262262 HookEvent : ParseHookEvent (form .WebhookForm ),
263263 IsActive : form .Active ,
264- HookTaskType : kind ,
264+ Type : kind ,
265265 OrgID : orCtx .OrgID ,
266266 IsSystemWebhook : orCtx .IsSystemWebhook ,
267267 }
@@ -311,7 +311,7 @@ func DiscordHooksNewPost(ctx *context.Context, form auth.NewDiscordHookForm) {
311311 ContentType : models .ContentTypeJSON ,
312312 HookEvent : ParseHookEvent (form .WebhookForm ),
313313 IsActive : form .Active ,
314- HookTaskType : models .DISCORD ,
314+ Type : models .DISCORD ,
315315 Meta : string (meta ),
316316 OrgID : orCtx .OrgID ,
317317 IsSystemWebhook : orCtx .IsSystemWebhook ,
@@ -353,7 +353,7 @@ func DingtalkHooksNewPost(ctx *context.Context, form auth.NewDingtalkHookForm) {
353353 ContentType : models .ContentTypeJSON ,
354354 HookEvent : ParseHookEvent (form .WebhookForm ),
355355 IsActive : form .Active ,
356- HookTaskType : models .DINGTALK ,
356+ Type : models .DINGTALK ,
357357 Meta : "" ,
358358 OrgID : orCtx .OrgID ,
359359 IsSystemWebhook : orCtx .IsSystemWebhook ,
@@ -404,7 +404,7 @@ func TelegramHooksNewPost(ctx *context.Context, form auth.NewTelegramHookForm) {
404404 ContentType : models .ContentTypeJSON ,
405405 HookEvent : ParseHookEvent (form .WebhookForm ),
406406 IsActive : form .Active ,
407- HookTaskType : models .TELEGRAM ,
407+ Type : models .TELEGRAM ,
408408 Meta : string (meta ),
409409 OrgID : orCtx .OrgID ,
410410 IsSystemWebhook : orCtx .IsSystemWebhook ,
@@ -458,7 +458,7 @@ func MatrixHooksNewPost(ctx *context.Context, form auth.NewMatrixHookForm) {
458458 HTTPMethod : "PUT" ,
459459 HookEvent : ParseHookEvent (form .WebhookForm ),
460460 IsActive : form .Active ,
461- HookTaskType : models .MATRIX ,
461+ Type : models .MATRIX ,
462462 Meta : string (meta ),
463463 OrgID : orCtx .OrgID ,
464464 IsSystemWebhook : orCtx .IsSystemWebhook ,
@@ -500,7 +500,7 @@ func MSTeamsHooksNewPost(ctx *context.Context, form auth.NewMSTeamsHookForm) {
500500 ContentType : models .ContentTypeJSON ,
501501 HookEvent : ParseHookEvent (form .WebhookForm ),
502502 IsActive : form .Active ,
503- HookTaskType : models .MSTEAMS ,
503+ Type : models .MSTEAMS ,
504504 Meta : "" ,
505505 OrgID : orCtx .OrgID ,
506506 IsSystemWebhook : orCtx .IsSystemWebhook ,
@@ -559,7 +559,7 @@ func SlackHooksNewPost(ctx *context.Context, form auth.NewSlackHookForm) {
559559 ContentType : models .ContentTypeJSON ,
560560 HookEvent : ParseHookEvent (form .WebhookForm ),
561561 IsActive : form .Active ,
562- HookTaskType : models .SLACK ,
562+ Type : models .SLACK ,
563563 Meta : string (meta ),
564564 OrgID : orCtx .OrgID ,
565565 IsSystemWebhook : orCtx .IsSystemWebhook ,
@@ -601,7 +601,7 @@ func FeishuHooksNewPost(ctx *context.Context, form auth.NewFeishuHookForm) {
601601 ContentType : models .ContentTypeJSON ,
602602 HookEvent : ParseHookEvent (form .WebhookForm ),
603603 IsActive : form .Active ,
604- HookTaskType : models .FEISHU ,
604+ Type : models .FEISHU ,
605605 Meta : "" ,
606606 OrgID : orCtx .OrgID ,
607607 IsSystemWebhook : orCtx .IsSystemWebhook ,
@@ -647,8 +647,8 @@ func checkWebhook(ctx *context.Context) (*orgRepoCtx, *models.Webhook) {
647647 return nil , nil
648648 }
649649
650- ctx .Data ["HookType" ] = w .HookTaskType
651- switch w .HookTaskType {
650+ ctx .Data ["HookType" ] = w .Type
651+ switch w .Type {
652652 case models .SLACK :
653653 ctx .Data ["SlackHook" ] = webhook .GetSlackHook (w )
654654 case models .DISCORD :
0 commit comments