mirror of
https://github.com/gogs/gogs.git
synced 2025-09-04 19:37:58 +00:00
admin: sync wiki's hook files as well
This commit is contained in:
parent
32a868d431
commit
6132a82287
@ -1663,7 +1663,15 @@ func ReinitMissingRepositories() error {
|
|||||||
func SyncRepositoryHooks() error {
|
func SyncRepositoryHooks() error {
|
||||||
return x.Where("id > 0").Iterate(new(Repository),
|
return x.Where("id > 0").Iterate(new(Repository),
|
||||||
func(idx int, bean interface{}) error {
|
func(idx int, bean interface{}) error {
|
||||||
return createDelegateHooks(bean.(*Repository).RepoPath())
|
repo := bean.(*Repository)
|
||||||
|
if err := createDelegateHooks(repo.RepoPath()); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
if repo.HasWiki() {
|
||||||
|
return createDelegateHooks(repo.WikiPath())
|
||||||
|
}
|
||||||
|
return nil
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user