-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move RepoTransfer from models to models/repo sub package #32506
Conversation
Why? What's the benefit? |
I updated the description to explain the reason. |
Why not totally decouple the repo & org models? Just use them from service packages? |
|
Last call for another review @go-gitea/technical-oversight-committee |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's hope there aren't too many places relying on teams having potentially been loaded already (in terms of performance)
RepoTransfer
now is at models, but if we want to move it intorepo
model, it will depend onTeam
. So this PR also makes repo model depend on org model to make it possible. Just refactor, no code change.DeleteOrganization
frommodels/organization
to service layerAccessibleTeamReposEnv
tomodels/repo
RepoTransfer
frommodels
tomodels/repo
getUserTeamIDs
andGetUserTeamIDs
, MergeGetUserTeams
andgetUserTeams
.Team
'sRepos []*repo_model.Repository
to avoid dependency recycle.