-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Add List API Endpoint for RemoteRepository
and RemoteOrganization
#7510
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good start. However, I'm not sure if we have to implement this endpoint before #2759 (and #7169) because we are changing how RemoteRepository
will behave completely.
Maybe the API response won't change, but would be good to double check that, tho. Want to take a look at this?
Also, we may need to be able to filter by user account (github, gitlab, etc) as we are currently doing on API v2:
- https://readthedocs.org/api/v2/remote/repo/?org=162925 (filter by organization)
- https://readthedocs.org/api/v2/remote/repo/?own=gitlab (filter by account)
(you can see your own API URLs with the org=
and own=
values at https://readthedocs.org/dashboard/import/)
The idea of using /remote
as a namespace may be good as well. I'd call it /remotes/repositories/
in the new APIv3.
In APIv2 we also have /remote/account
and /remote/org
that I think they will be required here as well (could be done in a different PR, but should be considered in the whole implementation).
If you have the time and energy to work on these things, I'm happy to help you with the process, chat and/or talk about it.
Sure! 👍 I did not see the changes being done with remote repositories. I'll look into the changes and see if there is anything we need to change about this API.
I was thinking about that, but did not know what are the requirements for API V3 are. Thanks for letting me know 💯
This sound like a good idea. 👍
Okay, so we need all the API endpoints that are required for the import process.
Sure, I would love to work on this, recently working with different API's and liking it a lot, and RTD has one of the best designed API 💯 It would be great if you are able to help me with the process, Let me know when you are free to talk or chat about it, maybe on slack? |
I'm on Slack on Europe time. Feel free to ping me there when you have time. |
@saadmk11 this could be a good pull request to cleanup and finish now we have the new structure deployed. |
1ad7862
to
1c66784
Compare
RemoteRepository
and RemoteOrganization
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! I left some comment with a few changes I'd like to see before merging this PR.
I'm also pinging @agjohnson here who is the one using this endpoint for the search-as-you-type in the new theme.
docs/api/v3.rst
Outdated
The ``results`` in response is an array of remote repositories data. | ||
|
||
:query string name: return remote repositories with matching name | ||
:query string vcs: return remote repositories for specific vcs (``git``, ``svn``, ``hg`` or ``bzr``) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can remove this one. Is there a good use case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so, vcs_provider
should be enough, but I saw it in the API v2, so I added it as I did not know the specific requirements for the API v3. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great!
We only need to revert the name__contains
👼
Co-authored-by: Manuel Kaufmann <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
I'm blocking this PR only on @agjohnson 's review. |
I don't have any particular feedback here, the PR looks great. If there is anything that I need changed it can be updated later. Merge away if this is ready to be merged! |
Thanks @saadmk11 for all your work here! I'm merging this PR. |
closes #7509