mirror of
https://github.com/go-gitea/gitea.git
synced 2025-09-29 06:34:04 -04:00
Move HasWiki to repository service package (#33912)
Move HasWiki out of the models package to avoid referencing the absolute wiki path directly.
This commit is contained in:
@@ -32,11 +32,12 @@ func SyncRepositoryHooks(ctx context.Context) error {
|
||||
}
|
||||
|
||||
if err := gitrepo.CreateDelegateHooks(ctx, repo); err != nil {
|
||||
return fmt.Errorf("SyncRepositoryHook: %w", err)
|
||||
return fmt.Errorf("CreateDelegateHooks: %w", err)
|
||||
}
|
||||
if repo.HasWiki() {
|
||||
|
||||
if HasWiki(ctx, repo) {
|
||||
if err := gitrepo.CreateDelegateHooks(ctx, repo.WikiStorageRepo()); err != nil {
|
||||
return fmt.Errorf("SyncRepositoryHook: %w", err)
|
||||
return fmt.Errorf("CreateDelegateHooks: %w", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user