aboutsummaryrefslogtreecommitdiffstats
path: root/services/webhook/dingtalk.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-11-10 13:13:16 +0800
committerGitHub <noreply@github.com>2021-11-10 13:13:16 +0800
commit33fca2b537d36cf998dd27425b2bb8ed5b0965f3 (patch)
tree817f392502e1c176a5cd7e80290520cb940a8416 /services/webhook/dingtalk.go
parentedbaa5d3f05b5ca397524587ba9db15edd61bc29 (diff)
downloadgitea-33fca2b537d36cf998dd27425b2bb8ed5b0965f3.tar.gz
gitea-33fca2b537d36cf998dd27425b2bb8ed5b0965f3.zip
Move webhook into models/webhook/ (#17579)
Diffstat (limited to 'services/webhook/dingtalk.go')
-rw-r--r--services/webhook/dingtalk.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/services/webhook/dingtalk.go b/services/webhook/dingtalk.go
index 7d352db18c..88e4078922 100644
--- a/services/webhook/dingtalk.go
+++ b/services/webhook/dingtalk.go
@@ -9,7 +9,7 @@ import (
"net/url"
"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"
@@ -123,7 +123,7 @@ func (d *DingtalkPayload) PullRequest(p *api.PullRequestPayload) (api.Payloader,
}
// Review implements PayloadConvertor Review method
-func (d *DingtalkPayload) Review(p *api.PullRequestPayload, event models.HookEventType) (api.Payloader, error) {
+func (d *DingtalkPayload) Review(p *api.PullRequestPayload, event webhook_model.HookEventType) (api.Payloader, error) {
var text, title string
switch p.Action {
case api.HookIssueReviewed:
@@ -185,6 +185,6 @@ func createDingtalkPayload(title, text, singleTitle, singleURL string) *Dingtalk
}
// GetDingtalkPayload converts a ding talk webhook into a DingtalkPayload
-func GetDingtalkPayload(p api.Payloader, event models.HookEventType, meta string) (api.Payloader, error) {
+func GetDingtalkPayload(p api.Payloader, event webhook_model.HookEventType, meta string) (api.Payloader, error) {
return convertPayloader(new(DingtalkPayload), p, event)
}