From 33fca2b537d36cf998dd27425b2bb8ed5b0965f3 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Wed, 10 Nov 2021 13:13:16 +0800 Subject: Move webhook into models/webhook/ (#17579) --- services/webhook/wechatwork.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'services/webhook/wechatwork.go') diff --git a/services/webhook/wechatwork.go b/services/webhook/wechatwork.go index 08c77ff2a5..d28e70aded 100644 --- a/services/webhook/wechatwork.go +++ b/services/webhook/wechatwork.go @@ -8,7 +8,7 @@ import ( "fmt" "strings" - "code.gitea.io/gitea/models" + 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" @@ -144,7 +144,7 @@ func (f *WechatworkPayload) PullRequest(p *api.PullRequestPayload) (api.Payloade } // Review implements PayloadConvertor Review method -func (f *WechatworkPayload) Review(p *api.PullRequestPayload, event models.HookEventType) (api.Payloader, error) { +func (f *WechatworkPayload) Review(p *api.PullRequestPayload, event webhook_model.HookEventType) (api.Payloader, error) { var text, title string switch p.Action { case api.HookIssueSynchronized: @@ -183,6 +183,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 models.HookEventType, meta string) (api.Payloader, error) { +func GetWechatworkPayload(p api.Payloader, event webhook_model.HookEventType, meta string) (api.Payloader, error) { return convertPayloader(new(WechatworkPayload), p, event) } -- cgit v1.2.3