Skip to content
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 AddCollabrator functions to service layer #32419

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

lunny
Copy link
Member

@lunny lunny commented Nov 4, 2024

  • Move CreateRepositoryByExample to service layer
  • Move AddCollabrator to service layer
  • Add a new parameter for AddCollabrator so that changing mode immediately after that will become unnecessary.

@lunny lunny added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label Nov 4, 2024
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Nov 4, 2024
@pull-request-size pull-request-size bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Nov 4, 2024
@github-actions github-actions bot added modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code labels Nov 4, 2024
@lunny lunny force-pushed the lunny/refactor-collaboration branch from c200c38 to 9a6b396 Compare November 4, 2024 18:58
@@ -8,6 +8,7 @@ import (

"code.gitea.io/gitea/models/unittest"

_ "code.gitea.io/gitea/models"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤨

Copy link
Member Author

@lunny lunny Nov 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a better change because that means the repository module will not depend on models directly. So that the test package needs to depend on models explicitly.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Nov 5, 2024
@lunny lunny added this to the 1.23.0 milestone Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/need 1 This PR needs approval from one additional maintainer to be merged. modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. type/refactoring Existing code has been cleaned up. There should be no new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants