summaryrefslogtreecommitdiffstats
path: root/modules/convert/convert.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2020-12-08 18:41:14 +0800
committerGitHub <noreply@github.com>2020-12-08 11:41:14 +0100
commit42354dfe45fa0cabb59674b896c44a55a56cf163 (patch)
tree86b859881da6ef6bf288183933d7bc519dedc3d4 /modules/convert/convert.go
parent4d66ee1f74799196cbdbfd925c3f95e552584b42 (diff)
downloadgitea-42354dfe45fa0cabb59674b896c44a55a56cf163.tar.gz
gitea-42354dfe45fa0cabb59674b896c44a55a56cf163.zip
Move webhook type from int to string (#13664)
* Move webhook type from int to string * rename webhook_services * finish refactor * Fix merge * Ignore unnecessary ci Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'modules/convert/convert.go')
-rw-r--r--modules/convert/convert.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/convert/convert.go b/modules/convert/convert.go
index 4d4d9396fe..9c90e6ac51 100644
--- a/modules/convert/convert.go
+++ b/modules/convert/convert.go
@@ -16,7 +16,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"
+ "code.gitea.io/gitea/services/webhook"
"github.com/unknwon/com"
)
@@ -237,7 +237,7 @@ func ToHook(repoLink string, w *models.Webhook) *api.Hook {
return &api.Hook{
ID: w.ID,
- Type: w.HookTaskType.Name(),
+ Type: string(w.HookTaskType),
URL: fmt.Sprintf("%s/settings/hooks/%d", repoLink, w.ID),
Active: w.IsActive,
Config: config,