diff --git a/models/repo/repo_repository.go b/models/repo/repo_repository.go index f05c498607..b9b6bc2f51 100644 --- a/models/repo/repo_repository.go +++ b/models/repo/repo_repository.go @@ -15,7 +15,7 @@ func init() { db.RegisterModel(new(FederatedRepo)) } -func FindFederatedRepoByRepoID(ctx context.Context, repoId int64) ([]*FederatedRepo, error) { +func FindFederatedReposByRepoID(ctx context.Context, repoId int64) ([]*FederatedRepo, error) { maxFederatedRepos := 10 sess := db.GetEngine(ctx).Where("repo_id=?", repoId) sess = sess.Limit(maxFederatedRepos, 0) diff --git a/modules/context/repo.go b/modules/context/repo.go index 35667b5a19..ea612cc1af 100644 --- a/modules/context/repo.go +++ b/modules/context/repo.go @@ -380,7 +380,7 @@ func repoAssignment(ctx *Context, repo *repo_model.Repository) { ctx.Data["HasAccess"] = true ctx.Data["Permission"] = &ctx.Repo.Permission - federatedRepo, err := repo_model.FindFederatedRepoByRepoID(ctx, repo.ID) + federatedRepo, err := repo_model.FindFederatedReposByRepoID(ctx, repo.ID) if err == nil { // TODO: concat string to semicolon sperated list here ctx.Data["FederatedRepos"] = federatedRepo