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

/repos/search api returns fewer responses than the "Explore" section #34

Open
KShivendu opened this issue Aug 3, 2022 · 1 comment
Open

Comments

@KShivendu
Copy link

The official Gogs v1 /repos/search API seems to be returning fewer responses when compared to the "Explore" section.

For example:

So is there any implicit difference between these routes or is it a bug?

@KShivendu
Copy link
Author

KShivendu commented Aug 3, 2022

Hi,

I did some experiments to find out the difference between the two endpoints. I created 4 types of repos that are supported by Gogs:

  • private
  • public (Link)
  • unlisted: publically accessible via direct link but not via search or APIs (Link)
  • mirror (Link)

https://try.gogs.io/api/v1/repos/search?q=KShivendu&page=1 only returns the public repo and the mirror repo. While the "explore" section shows these along with the "unlisted" repos that the user created.

This seems like the expected behavior. And based on this, the number of visible repos obtained by both the approaches should be the same (excluding the user's own "unlisted" repos).

But then what's causing such a big difference in the number of repos returned by these two endpoints?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant