Only initiate Gitea client on use

This commit is contained in:
2024-03-06 16:21:52 -05:00
parent 8764edad99
commit f71f8d1ee0
3 changed files with 8 additions and 4 deletions

View File

@@ -75,6 +75,7 @@ func GetOwnerRepo(fullName string) (string, string) {
func (r *GiteaRemote) GetNumProjects(opts *remote.RemoteQueryOpts) int {
var projects int
r.setClient()
_, resp, err := r.api.SearchRepos(gitea.SearchRepoOptions{ListOptions: gitea.ListOptions{PageSize: 1}})
if err != nil {