mirror of
https://github.com/go-gitea/gitea.git
synced 2025-09-23 10:28:31 +00: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:
@@ -280,7 +280,9 @@ func CleanUpMigrateInfo(ctx context.Context, repo *repo_model.Repository) (*repo
|
||||
if err := gitrepo.CreateDelegateHooks(ctx, repo); err != nil {
|
||||
return repo, fmt.Errorf("createDelegateHooks: %w", err)
|
||||
}
|
||||
if repo.HasWiki() {
|
||||
|
||||
hasWiki := HasWiki(ctx, repo)
|
||||
if hasWiki {
|
||||
if err := gitrepo.CreateDelegateHooks(ctx, repo.WikiStorageRepo()); err != nil {
|
||||
return repo, fmt.Errorf("createDelegateHooks.(wiki): %w", err)
|
||||
}
|
||||
@@ -291,7 +293,7 @@ func CleanUpMigrateInfo(ctx context.Context, repo *repo_model.Repository) (*repo
|
||||
return repo, fmt.Errorf("CleanUpMigrateInfo: %w", err)
|
||||
}
|
||||
|
||||
if repo.HasWiki() {
|
||||
if hasWiki {
|
||||
if err := cleanUpMigrateGitConfig(ctx, repo.WikiPath()); err != nil {
|
||||
return repo, fmt.Errorf("cleanUpMigrateGitConfig (wiki): %w", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user