Add web API support for querying remote repositories.
Review Request #5917 — Created June 2, 2014 and submitted
This adds a new child resource off the HostingServiceAccount resource
for querying remote repositories.Since every hosting service works differently, this resource needs to
take different query parameters depending on the hosting service it's
querying. Specifically, theowner-type=
andfilter-type=
values.
Tested this with valid and invalid repositories on GitHub.
Tested different possible values for
owner_type
andfilter_type
.Unit tests pass.
Built docs and saw that they looked correct (though, examples and links
have to be turned off, since we don't have DB-backed state to generate
from).
Description | From | Last Updated |
---|---|---|
Should these have any kind of bounds checking? |
david | |
How about s/against/for/? |
david | |
"that service" |
david | |
Get rid of "down" |
david | |
How about putting this into a mixin class, rather than monkey patching it in? |
david | |
Should include a comma after this. |
david | |
This line should have a comma after it. |
david |
-
This is a review from Review Bot. Tool: Pyflakes Processed Files: reviewboard/testing/testcase.py reviewboard/webapi/resources/remote_repository.py reviewboard/webapi/tests/test_remote_repository.py reviewboard/webapi/tests/urls.py reviewboard/webapi/tests/mimetypes.py reviewboard/webapi/resources/hosting_service_account.py Ignored Files: docs/manual/webapi/2.0/resources/remote-repository-list.rst docs/manual/fixtures/initial_data.json docs/manual/webapi/2.0/resources/index.rst docs/manual/webapi/2.0/resources/remote-repository.rst
- Change Summary:
-
- Improved docs.
- Added bounds checking for
get_prev_index
. (get_next_index
has no checking, as we have no guarantee of any reliable counts from the server). - Added trailing commas.
- Commit:
-
43ae151a9c01e2ae41ee3acba223e83218f7cf99c17c76ea2101232886ea5632c344f1d8512c9ff0
- Diff:
-
Revision 2 (+423 -2)
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/testing/testcase.py reviewboard/webapi/resources/remote_repository.py reviewboard/webapi/tests/test_remote_repository.py reviewboard/webapi/tests/urls.py reviewboard/webapi/tests/mimetypes.py reviewboard/webapi/resources/hosting_service_account.py Ignored Files: docs/manual/webapi/2.0/resources/remote-repository-list.rst docs/manual/fixtures/initial_data.json docs/manual/webapi/2.0/resources/index.rst docs/manual/webapi/2.0/resources/remote-repository.rst
-
This is a review from Review Bot. Tool: Pyflakes Processed Files: reviewboard/testing/testcase.py reviewboard/webapi/resources/remote_repository.py reviewboard/webapi/tests/test_remote_repository.py reviewboard/webapi/tests/urls.py reviewboard/webapi/tests/mimetypes.py reviewboard/webapi/resources/hosting_service_account.py Ignored Files: docs/manual/webapi/2.0/resources/remote-repository-list.rst docs/manual/fixtures/initial_data.json docs/manual/webapi/2.0/resources/index.rst docs/manual/webapi/2.0/resources/remote-repository.rst