Skip to content

API: allow remote repo full name query #10513

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

Closed
agjohnson opened this issue Jul 6, 2023 · 1 comment · Fixed by #10551
Closed

API: allow remote repo full name query #10513

agjohnson opened this issue Jul 6, 2023 · 1 comment · Fixed by #10551
Assignees
Labels
Improvement Minor improvement to code

Comments

@agjohnson
Copy link
Contributor

agjohnson commented Jul 6, 2023

The new dashboard is still using the API v2 remote repo API, which does not allow for expansion on project results and doesn't have all of the fields that I'd like to use in the results listing. The API v3 needs the v2 API implementation for searching by full_name, the current pattern for searching full_name by icontains on the v2 API works okay for now.

I didn't want to alter the v2 API further, as we should really be moving towards the v3 API, but if it's just easier to add expansion there for some reason, that is also fine.

Note: this also gives expansion on the nested projects in the result, so we can get fields like the avatar_url, etc. The current v2 search only returns the project slug and a link to the project dashboard.

@humitos
Copy link
Member

humitos commented Jul 20, 2023

I created the #10551 for this, but I wanted to note here that we already had a filter called name=. The difference between full_name= and name= is that full name includes the name of the username/organization the repository belongs to.

humitos added a commit that referenced this issue Jul 24, 2023
* API: add `?full_name=` icontains filter on RemoteRepository

This allows to perform queries like:

 * http://devthedocs.org/api/v3/remote/repositories/?full_name=getnikola
 * http://devthedocs.org/api/v3/remote/repositories/?full_name=readthedocs&expand=projects

Closes #10513

* API: add test case for `?full_name=` filter

* Docs: update APIv3 query parameters to add `full_name`
@github-project-automation github-project-automation bot moved this from Needs review to Done in 📍Roadmap Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Minor improvement to code
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants