- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 6.2k
Move RepoTransfer from models to models/repo sub package #32506
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
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)
RepoTransfernow is at models, but if we want to move it intorepomodel, it will depend onTeam. So this PR also makes repo model depend on org model to make it possible. Just refactor, no code change.DeleteOrganizationfrommodels/organizationto service layerAccessibleTeamReposEnvtomodels/repoRepoTransferfrommodelstomodels/repogetUserTeamIDsandGetUserTeamIDs, MergeGetUserTeamsandgetUserTeams.Team'sRepos []*repo_model.Repositoryto avoid dependency recycle.