aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/repo/repo.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2024-12-17 19:44:16 -0800
committerGitHub <noreply@github.com>2024-12-18 11:44:16 +0800
commite4c4629465f4e45ffdb9ef5eff6ef17e15ee4c2d (patch)
tree14ac77bb922dfdb9883630f6b2769973becb6f7e /routers/web/repo/repo.go
parentb9457422934f33a37e0285d100007aae12e87ff7 (diff)
downloadgitea-e4c4629465f4e45ffdb9ef5eff6ef17e15ee4c2d.tar.gz
gitea-e4c4629465f4e45ffdb9ef5eff6ef17e15ee4c2d.zip
Move RepoTransfer from models to models/repo sub package (#32506)
`RepoTransfer` now is at models, but if we want to move it into `repo` model, it will depend on `Team`. So this PR also makes repo model depend on org model to make it possible. Just refactor, no code change. - [x] Move `DeleteOrganization` from `models/organization` to service layer - [x] Move `AccessibleTeamReposEnv` to `models/repo` - [x] Move `RepoTransfer` from `models` to `models/repo` - [x] Merge `getUserTeamIDs` and `GetUserTeamIDs`, Merge `GetUserTeams` and `getUserTeams`. - [x] Remove `Team`'s `Repos []*repo_model.Repository` to avoid dependency recycle.
Diffstat (limited to 'routers/web/repo/repo.go')
-rw-r--r--routers/web/repo/repo.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/routers/web/repo/repo.go b/routers/web/repo/repo.go
index f5e59b0357..4b017f61c4 100644
--- a/routers/web/repo/repo.go
+++ b/routers/web/repo/repo.go
@@ -11,7 +11,6 @@ import (
"slices"
"strings"
- "code.gitea.io/gitea/models"
"code.gitea.io/gitea/models/db"
git_model "code.gitea.io/gitea/models/git"
"code.gitea.io/gitea/models/organization"
@@ -378,7 +377,7 @@ func Action(ctx *context.Context) {
}
func acceptOrRejectRepoTransfer(ctx *context.Context, accept bool) error {
- repoTransfer, err := models.GetPendingRepositoryTransfer(ctx, ctx.Repo.Repository)
+ repoTransfer, err := repo_model.GetPendingRepositoryTransfer(ctx, ctx.Repo.Repository)
if err != nil {
return err
}