mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-23 19:47:07 +09:00
Move more webhook codes from models to webhook module (#8802)
* Move more webhook codes from models to webhook module
This commit is contained in:
1 parent
491887d441
commit
a966a0298e
12 files changed
+145
-135
No files matched your search
@@ -15,6 +15,7 @@ import (
|
||||
"code.gitea.io/gitea/modules/structs"
|
||||
api "code.gitea.io/gitea/modules/structs"
|
||||
"code.gitea.io/gitea/modules/util"
|
||||
"code.gitea.io/gitea/modules/webhook"
|
||||
|
||||
"github.com/unknwon/com"
|
||||
)
|
||||
@@ -166,7 +167,7 @@ func ToHook(repoLink string, w *models.Webhook) *api.Hook {
|
||||
"content_type": w.ContentType.Name(),
|
||||
}
|
||||
if w.HookTaskType == models.SLACK {
|
||||
s := w.GetSlackHook()
|
||||
s := webhook.GetSlackHook(w)
|
||||
config["channel"] = s.Channel
|
||||
config["username"] = s.Username
|
||||
config["icon_url"] = s.IconURL
|
||||
|
||||
Reference in new issue
Block a user