|
|
|
@ -710,8 +710,8 @@ func (org *Organization) GetUserTeams(userID int64) ([]*Team, error) { |
|
|
|
|
type AccessibleReposEnvironment interface { |
|
|
|
|
CountRepos() (int64, error) |
|
|
|
|
RepoIDs(page, pageSize int) ([]int64, error) |
|
|
|
|
Repos(page, pageSize int) ([]*repo_model.Repository, error) |
|
|
|
|
MirrorRepos() ([]*repo_model.Repository, error) |
|
|
|
|
Repos(page, pageSize int) (repo_model.RepositoryList, error) |
|
|
|
|
MirrorRepos() (repo_model.RepositoryList, error) |
|
|
|
|
AddKeyword(keyword string) |
|
|
|
|
SetSort(db.SearchOrderBy) |
|
|
|
|
} |
|
|
|
@ -813,7 +813,7 @@ func (env *accessibleReposEnv) RepoIDs(page, pageSize int) ([]int64, error) { |
|
|
|
|
Find(&repoIDs) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (env *accessibleReposEnv) Repos(page, pageSize int) ([]*repo_model.Repository, error) { |
|
|
|
|
func (env *accessibleReposEnv) Repos(page, pageSize int) (repo_model.RepositoryList, error) { |
|
|
|
|
repoIDs, err := env.RepoIDs(page, pageSize) |
|
|
|
|
if err != nil { |
|
|
|
|
return nil, fmt.Errorf("GetUserRepositoryIDs: %w", err) |
|
|
|
@ -842,7 +842,7 @@ func (env *accessibleReposEnv) MirrorRepoIDs() ([]int64, error) { |
|
|
|
|
Find(&repoIDs) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (env *accessibleReposEnv) MirrorRepos() ([]*repo_model.Repository, error) { |
|
|
|
|
func (env *accessibleReposEnv) MirrorRepos() (repo_model.RepositoryList, error) { |
|
|
|
|
repoIDs, err := env.MirrorRepoIDs() |
|
|
|
|
if err != nil { |
|
|
|
|
return nil, fmt.Errorf("MirrorRepoIDs: %w", err) |
|
|
|
|