go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
45.29k stars 5.51k forks source link

Move RepoTransfer from models to models/repo sub package #32506

Open lunny opened 1 week ago

lunny commented 1 week ago

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.

wxiaoguang commented 1 week ago

Why? What's the benefit?

lunny commented 1 week ago

Why? What's the benefit?

I updated the description to explain the reason.

wxiaoguang commented 1 week ago

Why not totally decouple the repo & org models? Just use them from service packages?

lunny commented 1 week ago

Why not totally decouple the repo & org models? Just use them from service packages?

~RepoTransfer now is at models, but if we want to move it into repo model, it will depend on Team, this is another reason why we need this change. And we cannot move RepoTransfer to service layer.~ Included moving RepoTransfer to models/repo sub package.