fix(org): restore profile/wiki lookup to renamed .mokogit repos #790
@@ -145,14 +145,14 @@ type PrepareOwnerHeaderResult struct {
|
||||
}
|
||||
|
||||
const (
|
||||
RepoNameProfile = ".mokogitea"
|
||||
RepoNameProfilePrivate = ".mokogitea-private"
|
||||
RepoNameWikiPublic = ".mokogitea"
|
||||
RepoNameWikiPrivate = ".mokogitea-private"
|
||||
RepoNameProfile = ".mokogit"
|
||||
RepoNameProfilePrivate = ".mokogit-private"
|
||||
RepoNameWikiPublic = ".mokogit"
|
||||
RepoNameWikiPrivate = ".mokogit-private"
|
||||
)
|
||||
|
||||
// profileFallbacks maps primary repo names to their fallback alternatives.
|
||||
// Priority: .mokogitea > .profile > .github
|
||||
// Priority: .mokogit > .profile > .github
|
||||
var profileFallbacks = map[string][]string{
|
||||
RepoNameProfile: {".profile", ".github"},
|
||||
RepoNameProfilePrivate: {".profile-private", ".github-private"},
|
||||
@@ -237,7 +237,7 @@ func loadHeaderCount(ctx *context.Context) error {
|
||||
}
|
||||
|
||||
// OrgWikiRepoExists checks whether a profile repo's wiki exists and has content.
|
||||
// Tries fallback repo names (.mokogitea, .github) if the primary doesn't exist.
|
||||
// Tries fallback repo names (.mokogit, .github) if the primary doesn't exist.
|
||||
func OrgWikiRepoExists(ctx *context.Context, ownerID int64, repoName string) bool {
|
||||
namesToTry := ProfileRepoFallbacks(repoName)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user