summaryrefslogtreecommitdiffstats
path: root/models/repo_generate.go
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 /models/repo_generate.go
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 'models/repo_generate.go')
-rw-r--r--models/repo_generate.go22
1 files changed, 11 insertions, 11 deletions
diff --git a/models/repo_generate.go b/models/repo_generate.go
index 0b234d8e34..b0016494c4 100644
--- a/models/repo_generate.go
+++ b/models/repo_generate.go
@@ -117,17 +117,17 @@ func GenerateWebhooks(ctx DBContext, templateRepo, generateRepo *Repository) err
for _, templateWebhook := range templateWebhooks {
generateWebhook := &Webhook{
- RepoID: generateRepo.ID,
- URL: templateWebhook.URL,
- HTTPMethod: templateWebhook.HTTPMethod,
- ContentType: templateWebhook.ContentType,
- Secret: templateWebhook.Secret,
- HookEvent: templateWebhook.HookEvent,
- IsActive: templateWebhook.IsActive,
- HookTaskType: templateWebhook.HookTaskType,
- OrgID: templateWebhook.OrgID,
- Events: templateWebhook.Events,
- Meta: templateWebhook.Meta,
+ RepoID: generateRepo.ID,
+ URL: templateWebhook.URL,
+ HTTPMethod: templateWebhook.HTTPMethod,
+ ContentType: templateWebhook.ContentType,
+ Secret: templateWebhook.Secret,
+ HookEvent: templateWebhook.HookEvent,
+ IsActive: templateWebhook.IsActive,
+ Type: templateWebhook.Type,
+ OrgID: templateWebhook.OrgID,
+ Events: templateWebhook.Events,
+ Meta: templateWebhook.Meta,
}
if err := createWebhook(ctx.e, generateWebhook); err != nil {
return err