forked from NYANDEV/forgejo
Fix broken migration on webhook (#13911)
* Fix broken migration on webhook * Fix lint Co-authored-by: John Olheiser <john.olheiser@gmail.com>
This commit is contained in:
parent
18e4477ad4
commit
6edfa6bc88
8 changed files with 98 additions and 37 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue