mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-07-15 05:01:41 +08:00
Implement Default Webhooks (#4299)
Partially implement #770. Add "Default Webhooks" page in site admin UI. Persist to the existing webhooks table, but store with RepoID=0 and OrgID=0. Upon repo creation, copy the set of default webhooks into the new repo.
This commit is contained in:

committed by
techknowlogick

parent
cac9e6e760
commit
b34996a629
@ -1366,6 +1366,10 @@ func createRepository(e *xorm.Session, doer, u *User, repo *Repository) (err err
|
||||
return fmt.Errorf("newRepoAction: %v", err)
|
||||
}
|
||||
|
||||
if err = copyDefaultWebhooksToRepo(e, repo.ID); err != nil {
|
||||
return fmt.Errorf("copyDefaultWebhooksToRepo: %v", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user