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:
Lunny Xiao authored and GitHub committed 2025-09-01 11:12:58 -07:00
1 parent ea96ff6b0c
commit 4e1b8db1fc
17 files changed
+76 -54

No files matched your search

+4 -3
View File
@@ -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