herrhotzenplotz / gcli

Portable Git(hub|lab|tea) CLI tool
https://herrhotzenplotz.de/gcli/
BSD 2-Clause "Simplified" License
48 stars 2 forks source link

Gitea user repos #136

Open feraxhp opened 2 weeks ago

feraxhp commented 2 weeks ago

I have been testing the app this days, and i found that when you try to list all the repos from a specific user, it does not work because you are currently calling this endpoint:

https://{client-url}/api/orgs/{org}/repos

this endpoint only works with organizations, and if you want to fetch the user repos you must use this other one:

https://{client-url}/api/user/{user}/repos

Sorry if my English is not good enough

herrhotzenplotz commented 1 week ago

This seems to work for me.

There is a different issue however:

gcli first tries to query assuming that -o <org> is a user. If that fails it assumes it's an org and errors out saying that the org cannot be found.

Maybe you typo-ed your username? ... and the misleading error message is indeed something we should fix.