Skip to content

Commit 6132a82

Browse files
committed
admin: sync wiki's hook files as well
1 parent 32a868d commit 6132a82

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

models/repo.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1663,7 +1663,15 @@ func ReinitMissingRepositories() error {
16631663
func SyncRepositoryHooks() error {
16641664
return x.Where("id > 0").Iterate(new(Repository),
16651665
func(idx int, bean interface{}) error {
1666-
return createDelegateHooks(bean.(*Repository).RepoPath())
1666+
repo := bean.(*Repository)
1667+
if err := createDelegateHooks(repo.RepoPath()); err != nil {
1668+
return err
1669+
}
1670+
1671+
if repo.HasWiki() {
1672+
return createDelegateHooks(repo.WikiPath())
1673+
}
1674+
return nil
16671675
})
16681676
}
16691677

0 commit comments

Comments
 (0)