mirror of
https://github.com/go-gitea/gitea.git
synced 2026-11-19 15:14:40 +09:00
Remove the "adopt unadopted repositories" feature. Adopting assumes a fixed repository storage path on disk, which makes the storage path hard to change. It is mostly used once for migrations, and the [Gitea importer](https://gitea.com/gitea/importer) covers that after the repositories are moved out of the repository root. The docs are updated in https://gitea.com/gitea/docs/pulls/639. - Remove the admin and user adopt pages, the `/admin/unadopted` API endpoints and the adopt notifier hook - Remove the `ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES` and `ALLOW_DELETION_OF_UNADOPTED_REPOSITORIES` settings - The user "Repositories" settings page only lists the user's repositories - Repository files without a database record must now be removed from disk by the administrator Assisted-by: Codet:claude --------- Co-authored-by: silverwind <me@silverwind.io>
29 lines
983 B
Go
29 lines
983 B
Go
// Copyright 2026 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package gitrepo
|
|
|
|
import (
|
|
"strings"
|
|
|
|
"gitea.dev/modules/util"
|
|
)
|
|
|
|
func RepoCodeGitRepoRelativePath(ownerName, repoName string) string {
|
|
return util.PathJoinRelX(strings.ToLower(ownerName), strings.ToLower(repoName)+".git")
|
|
}
|
|
|
|
func RepoWikiGitRepoRelativePath(ownerName, repoName string) string {
|
|
return util.PathJoinRelX(strings.ToLower(ownerName), strings.ToLower(repoName)+".wiki.git")
|
|
}
|
|
|
|
// CodeRepoByName returns an unmanaged repository facade for the code repository of the given owner and repository name.
|
|
// Usually it is used for migration fixes or repository creation/rename/transfer.
|
|
func CodeRepoByName(ownerName, repoName string) RepositoryFacade {
|
|
return RepositoryUnmanaged(RepoCodeGitRepoRelativePath(ownerName, repoName))
|
|
}
|
|
|
|
func WikiRepoByName(ownerName, repoName string) RepositoryFacade {
|
|
return RepositoryUnmanaged(RepoWikiGitRepoRelativePath(ownerName, repoName))
|
|
}
|