1
0
Fork 0
forked from forgejo/forgejo

Restructure webhook module (#22256)

Previously, there was an `import services/webhooks` inside
`modules/notification/webhook`.
This import was removed (after fighting against many import cycles).
Additionally, `modules/notification/webhook` was moved to
`modules/webhook`,
and a few structs/constants were extracted from `models/webhooks` to
`modules/webhook`.

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
delvh 2023-01-01 16:23:15 +01:00 committed by GitHub
parent f8e93ce423
commit 0f4e1b9ac6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
37 changed files with 444 additions and 362 deletions

View file

@ -12,6 +12,7 @@ import (
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
api "code.gitea.io/gitea/modules/structs"
webhook_module "code.gitea.io/gitea/modules/webhook"
gouuid "github.com/google/uuid"
)
@ -107,7 +108,7 @@ type HookTask struct {
UUID string `xorm:"unique"`
api.Payloader `xorm:"-"`
PayloadContent string `xorm:"LONGTEXT"`
EventType HookEventType
EventType webhook_module.HookEventType
IsDelivered bool
Delivered int64
DeliveredString string `xorm:"-"`