From 6d814447d09d6723f5148bb879891544286e8f10 Mon Sep 17 00:00:00 2001 From: erik Date: Mon, 25 Mar 2024 16:52:39 +0100 Subject: [PATCH] Use Plural --- models/repo/repo_repository.go | 2 +- modules/context/repo.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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