gitea/models/organization
Lunny Xiao fbe6d9dc6b
Use batch database operations instead of one by one to optimze api pulls ()
Resolve 

The response time for the Pull Requests API has improved significantly,
dropping from over `2000ms` to about `350ms` on my local machine. It's
about `6` times faster.

A key area for further optimization lies in batch-fetching data for
`apiPullRequest.ChangedFiles, apiPullRequest.Additions, and
apiPullRequest.Deletions`.

Tests `TestAPIViewPulls` does exist and new tests added.

- This PR also fixes some bugs in `GetDiff` functions.
- This PR also fixes data inconsistent in test data. For a pull request,
the head branch's reference should be equal to the reference in
`pull/xxx/head`.
..
main_test.go make writing main test easier ()
org.go Reimplement GetUserOrgsList to make it simple and clear ()
org_list.go Introduce OrgList and add LoadTeams, optimaze Load teams for orgs ()
org_list_test.go Introduce OrgList and add LoadTeams, optimaze Load teams for orgs ()
org_repo.go Use RepositoryList instead of []*Repository ()
org_test.go Reimplement GetUserOrgsList to make it simple and clear ()
org_user.go Add option to filter board cards by labels and assignees ()
org_user_test.go Calculate `PublicOnly` for org membership only once ()
team.go Enable more `revive` linter rules ()
team_invite.go Implement FSFE REUSE for golang files ()
team_invite_test.go Replace 'userxx' with 'orgxx' in all test files when the user type is org ()
team_list.go Use batch database operations instead of one by one to optimze api pulls ()
team_list_test.go Use batch database operations instead of one by one to optimze api pulls ()
team_repo.go Fix get reviewers' bug ()
team_repo_test.go Fix get reviewers' bug ()
team_test.go Move team related functions to service layer ()
team_unit.go Even more `db.DefaultContext` refactor ()
team_user.go Add user blocking ()