diff options
author | delvh <leon@kske.dev> | 2023-01-01 16:23:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-01 23:23:15 +0800 |
commit | 0f4e1b9ac66b8ffa0083a5a2516e4710393bb0da (patch) | |
tree | 4514951316ebfb10dabf1ffbc856142839817a80 /services/webhook/wechatwork.go | |
parent | f8e93ce4238253c01e3ca36c88eb59979be99d12 (diff) | |
download | gitea-0f4e1b9ac66b8ffa0083a5a2516e4710393bb0da.tar.gz gitea-0f4e1b9ac66b8ffa0083a5a2516e4710393bb0da.zip |
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>
Diffstat (limited to 'services/webhook/wechatwork.go')
-rw-r--r-- | services/webhook/wechatwork.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/services/webhook/wechatwork.go b/services/webhook/wechatwork.go index a77d871dd7..dc8810c4a6 100644 --- a/services/webhook/wechatwork.go +++ b/services/webhook/wechatwork.go @@ -7,10 +7,10 @@ import ( "fmt" "strings" - webhook_model "code.gitea.io/gitea/models/webhook" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/json" api "code.gitea.io/gitea/modules/structs" + webhook_module "code.gitea.io/gitea/modules/webhook" ) type ( @@ -135,7 +135,7 @@ func (f *WechatworkPayload) PullRequest(p *api.PullRequestPayload) (api.Payloade } // Review implements PayloadConvertor Review method -func (f *WechatworkPayload) Review(p *api.PullRequestPayload, event webhook_model.HookEventType) (api.Payloader, error) { +func (f *WechatworkPayload) Review(p *api.PullRequestPayload, event webhook_module.HookEventType) (api.Payloader, error) { var text, title string switch p.Action { case api.HookIssueReviewed: @@ -180,6 +180,6 @@ func (f *WechatworkPayload) Release(p *api.ReleasePayload) (api.Payloader, error } // GetWechatworkPayload GetWechatworkPayload converts a ding talk webhook into a WechatworkPayload -func GetWechatworkPayload(p api.Payloader, event webhook_model.HookEventType, meta string) (api.Payloader, error) { +func GetWechatworkPayload(p api.Payloader, event webhook_module.HookEventType, _ string) (api.Payloader, error) { return convertPayloader(new(WechatworkPayload), p, event) } |