aboutsummaryrefslogtreecommitdiffstats
path: root/services/webhook/feishu.go
diff options
context:
space:
mode:
authordelvh <leon@kske.dev>2023-01-01 16:23:15 +0100
committerGitHub <noreply@github.com>2023-01-01 23:23:15 +0800
commit0f4e1b9ac66b8ffa0083a5a2516e4710393bb0da (patch)
tree4514951316ebfb10dabf1ffbc856142839817a80 /services/webhook/feishu.go
parentf8e93ce4238253c01e3ca36c88eb59979be99d12 (diff)
downloadgitea-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/feishu.go')
-rw-r--r--services/webhook/feishu.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/services/webhook/feishu.go b/services/webhook/feishu.go
index 58b6fff331..4fbf8f76a9 100644
--- a/services/webhook/feishu.go
+++ b/services/webhook/feishu.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 (
@@ -117,7 +117,7 @@ func (f *FeishuPayload) PullRequest(p *api.PullRequestPayload) (api.Payloader, e
}
// Review implements PayloadConvertor Review method
-func (f *FeishuPayload) Review(p *api.PullRequestPayload, event webhook_model.HookEventType) (api.Payloader, error) {
+func (f *FeishuPayload) Review(p *api.PullRequestPayload, event webhook_module.HookEventType) (api.Payloader, error) {
action, err := parseHookPullRequestEventType(event)
if err != nil {
return nil, err
@@ -159,6 +159,6 @@ func (f *FeishuPayload) Release(p *api.ReleasePayload) (api.Payloader, error) {
}
// GetFeishuPayload converts a ding talk webhook into a FeishuPayload
-func GetFeishuPayload(p api.Payloader, event webhook_model.HookEventType, meta string) (api.Payloader, error) {
+func GetFeishuPayload(p api.Payloader, event webhook_module.HookEventType, _ string) (api.Payloader, error) {
return convertPayloader(new(FeishuPayload), p, event)
}