aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2020-12-10 01:20:13 +0800
committerGitHub <noreply@github.com>2020-12-09 17:20:13 +0000
commit6edfa6bc88ed73fc5a31f1b2fe9f5587c932ada7 (patch)
treee6c479d97cbd006c3cc521ec77fde5c0d72b4cc1 /modules
parent18e4477ad41a8733225d3c92eea5b91c12af1a94 (diff)
downloadgitea-6edfa6bc88ed73fc5a31f1b2fe9f5587c932ada7.tar.gz
gitea-6edfa6bc88ed73fc5a31f1b2fe9f5587c932ada7.zip
Fix broken migration on webhook (#13911)
* Fix broken migration on webhook * Fix lint Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Diffstat (limited to 'modules')
-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 9c90e6ac51..f9f4a641e2 100644
--- a/modules/convert/convert.go
+++ b/modules/convert/convert.go
@@ -227,7 +227,7 @@ func ToHook(repoLink string, w *models.Webhook) *api.Hook {
"url": w.URL,
"content_type": w.ContentType.Name(),
}
- if w.HookTaskType == models.SLACK {
+ if w.Type == models.SLACK {
s := webhook.GetSlackHook(w)
config["channel"] = s.Channel
config["username"] = s.Username
@@ -237,7 +237,7 @@ func ToHook(repoLink string, w *models.Webhook) *api.Hook {
return &api.Hook{
ID: w.ID,
- Type: string(w.HookTaskType),
+ Type: string(w.Type),
URL: fmt.Sprintf("%s/settings/hooks/%d", repoLink, w.ID),
Active: w.IsActive,
Config: config,